<!DOCTYPE html PUBLIC "-//W3C//DTD XHTML 1.0 Transitional//EN" "http://www.w3.org/TR/xhtml1/DTD/xhtml1-transitional.dtd">
<html xmlns="http://www.w3.org/1999/xhtml">
<head>
<meta http-equiv="Content-Type" content="text/xhtml;charset=UTF-8"/>
<meta http-equiv="X-UA-Compatible" content="IE=9"/>
<meta name="generator" content="Doxygen 1.8.11"/>
<title>ShipCAD: ShipCADlib/hydrostaticcalc.cpp Source File</title>
<link href="tabs.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="jquery.js"></script>
<script type="text/javascript" src="dynsections.js"></script>
<link href="search/search.css" rel="stylesheet" type="text/css"/>
<script type="text/javascript" src="search/searchdata.js"></script>
<script type="text/javascript" src="search/search.js"></script>
<script type="text/javascript">
  $(document).ready(function() { init_search(); });
</script>
<link href="doxygen.css" rel="stylesheet" type="text/css" />
</head>
<body>
<div id="top"><!-- do not remove this div, it is closed by doxygen! -->
<div id="titlearea">
<table cellspacing="0" cellpadding="0">
 <tbody>
 <tr style="height: 56px;">
  <td id="projectalign" style="padding-left: 0.5em;">
   <div id="projectname">ShipCAD
   </div>
  </td>
 </tr>
 </tbody>
</table>
</div>
<!-- end header part -->
<!-- Generated by Doxygen 1.8.11 -->
<script type="text/javascript">
var searchBox = new SearchBox("searchBox", "search",false,'Search');
</script>
  <div id="navrow1" class="tabs">
    <ul class="tablist">
      <li><a href="index.html"><span>Main&#160;Page</span></a></li>
      <li><a href="namespaces.html"><span>Namespaces</span></a></li>
      <li><a href="annotated.html"><span>Classes</span></a></li>
      <li class="current"><a href="files.html"><span>Files</span></a></li>
      <li>
        <div id="MSearchBox" class="MSearchBoxInactive">
        <span class="left">
          <img id="MSearchSelect" src="search/mag_sel.png"
               onmouseover="return searchBox.OnSearchSelectShow()"
               onmouseout="return searchBox.OnSearchSelectHide()"
               alt=""/>
          <input type="text" id="MSearchField" value="Search" accesskey="S"
               onfocus="searchBox.OnSearchFieldFocus(true)" 
               onblur="searchBox.OnSearchFieldFocus(false)" 
               onkeyup="searchBox.OnSearchFieldChange(event)"/>
          </span><span class="right">
            <a id="MSearchClose" href="javascript:searchBox.CloseResultsWindow()"><img id="MSearchCloseImg" border="0" src="search/close.png" alt=""/></a>
          </span>
        </div>
      </li>
    </ul>
  </div>
  <div id="navrow2" class="tabs2">
    <ul class="tablist">
      <li><a href="files.html"><span>File&#160;List</span></a></li>
      <li><a href="globals.html"><span>File&#160;Members</span></a></li>
    </ul>
  </div>
<!-- window showing the filter options -->
<div id="MSearchSelectWindow"
     onmouseover="return searchBox.OnSearchSelectShow()"
     onmouseout="return searchBox.OnSearchSelectHide()"
     onkeydown="return searchBox.OnSearchSelectKey(event)">
</div>

<!-- iframe showing the search results (closed by default) -->
<div id="MSearchResultsWindow">
<iframe src="javascript:void(0)" frameborder="0" 
        name="MSearchResults" id="MSearchResults">
</iframe>
</div>

<div id="nav-path" class="navpath">
  <ul>
<li class="navelem"><a class="el" href="dir_f0b6ef187c5b1483641b038f81654ac4.html">ShipCADlib</a></li>  </ul>
</div>
</div><!-- top -->
<div class="header">
  <div class="headertitle">
<div class="title">hydrostaticcalc.cpp</div>  </div>
</div><!--header-->
<div class="contents">
<a href="hydrostaticcalc_8cpp.html">Go to the documentation of this file.</a><div class="fragment"><div class="line"><a name="l00001"></a><span class="lineno">    1</span>&#160;<span class="comment">/*##############################################################################################</span></div><div class="line"><a name="l00002"></a><span class="lineno">    2</span>&#160;<span class="comment"> *    ShipCAD                                                                                  *</span></div><div class="line"><a name="l00003"></a><span class="lineno">    3</span>&#160;<span class="comment"> *    Copyright 2015, by Greg Green &lt;ggreen@bit-builder.com&gt;                                   *</span></div><div class="line"><a name="l00004"></a><span class="lineno">    4</span>&#160;<span class="comment"> *    Original Copyright header below                                                          *</span></div><div class="line"><a name="l00005"></a><span class="lineno">    5</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00006"></a><span class="lineno">    6</span>&#160;<span class="comment"> *    This code is distributed as part of the FREE!ship project. FREE!ship is an               *</span></div><div class="line"><a name="l00007"></a><span class="lineno">    7</span>&#160;<span class="comment"> *    open source surface-modelling program based on subdivision surfaces and intended for     *</span></div><div class="line"><a name="l00008"></a><span class="lineno">    8</span>&#160;<span class="comment"> *    designing ships.                                                                         *</span></div><div class="line"><a name="l00009"></a><span class="lineno">    9</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00010"></a><span class="lineno">   10</span>&#160;<span class="comment"> *    Copyright © 2005, by Martijn van Engeland                                                *</span></div><div class="line"><a name="l00011"></a><span class="lineno">   11</span>&#160;<span class="comment"> *    e-mail                  : Info@FREEship.org                                              *</span></div><div class="line"><a name="l00012"></a><span class="lineno">   12</span>&#160;<span class="comment"> *    FREE!ship project page  : https://sourceforge.net/projects/freeship                      *</span></div><div class="line"><a name="l00013"></a><span class="lineno">   13</span>&#160;<span class="comment"> *    FREE!ship homepage      : www.FREEship.org                                               *</span></div><div class="line"><a name="l00014"></a><span class="lineno">   14</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00015"></a><span class="lineno">   15</span>&#160;<span class="comment"> *    This program is free software; you can redistribute it and/or modify it under            *</span></div><div class="line"><a name="l00016"></a><span class="lineno">   16</span>&#160;<span class="comment"> *    the terms of the GNU General Public License as published by the                          *</span></div><div class="line"><a name="l00017"></a><span class="lineno">   17</span>&#160;<span class="comment"> *    Free Software Foundation; either version 2 of the License, or (at your option)           *</span></div><div class="line"><a name="l00018"></a><span class="lineno">   18</span>&#160;<span class="comment"> *    any later version.                                                                       *</span></div><div class="line"><a name="l00019"></a><span class="lineno">   19</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00020"></a><span class="lineno">   20</span>&#160;<span class="comment"> *    This program is distributed in the hope that it will be useful, but WITHOUT ANY          *</span></div><div class="line"><a name="l00021"></a><span class="lineno">   21</span>&#160;<span class="comment"> *    WARRANTY; without even the implied warranty of MERCHANTABILITY or FITNESS FOR A          *</span></div><div class="line"><a name="l00022"></a><span class="lineno">   22</span>&#160;<span class="comment"> *    PARTICULAR PURPOSE. See the GNU General Public License for more details.                 *</span></div><div class="line"><a name="l00023"></a><span class="lineno">   23</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00024"></a><span class="lineno">   24</span>&#160;<span class="comment"> *    You should have received a copy of the GNU General Public License along with             *</span></div><div class="line"><a name="l00025"></a><span class="lineno">   25</span>&#160;<span class="comment"> *    this program; if not, write to the Free Software Foundation, Inc.,                       *</span></div><div class="line"><a name="l00026"></a><span class="lineno">   26</span>&#160;<span class="comment"> *    59 Temple Place, Suite 330, Boston, MA 02111-1307 USA                                    *</span></div><div class="line"><a name="l00027"></a><span class="lineno">   27</span>&#160;<span class="comment"> *                                                                                             *</span></div><div class="line"><a name="l00028"></a><span class="lineno">   28</span>&#160;<span class="comment"> *#############################################################################################*/</span></div><div class="line"><a name="l00029"></a><span class="lineno">   29</span>&#160;</div><div class="line"><a name="l00030"></a><span class="lineno">   30</span>&#160;<span class="preprocessor">#include &lt;cmath&gt;</span></div><div class="line"><a name="l00031"></a><span class="lineno">   31</span>&#160;<span class="preprocessor">#include &lt;algorithm&gt;</span></div><div class="line"><a name="l00032"></a><span class="lineno">   32</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="hydrostaticcalc_8h.html">hydrostaticcalc.h</a>&quot;</span></div><div class="line"><a name="l00033"></a><span class="lineno">   33</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="shipcadmodel_8h.html">shipcadmodel.h</a>&quot;</span></div><div class="line"><a name="l00034"></a><span class="lineno">   34</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="projsettings_8h.html">projsettings.h</a>&quot;</span></div><div class="line"><a name="l00035"></a><span class="lineno">   35</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="utility_8h.html">utility.h</a>&quot;</span></div><div class="line"><a name="l00036"></a><span class="lineno">   36</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="plane_8h.html">plane.h</a>&quot;</span></div><div class="line"><a name="l00037"></a><span class="lineno">   37</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="shipcadlib_8h.html">shipcadlib.h</a>&quot;</span></div><div class="line"><a name="l00038"></a><span class="lineno">   38</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="subdivlayer_8h.html">subdivlayer.h</a>&quot;</span></div><div class="line"><a name="l00039"></a><span class="lineno">   39</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="subdivface_8h.html">subdivface.h</a>&quot;</span></div><div class="line"><a name="l00040"></a><span class="lineno">   40</span>&#160;<span class="preprocessor">#include &quot;<a class="code" href="subdivpoint_8h.html">subdivpoint.h</a>&quot;</span></div><div class="line"><a name="l00041"></a><span class="lineno">   41</span>&#160;</div><div class="line"><a name="l00042"></a><span class="lineno">   42</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespacestd.html">std</a>;</div><div class="line"><a name="l00043"></a><span class="lineno">   43</span>&#160;<span class="keyword">using namespace </span><a class="code" href="namespaceShipCAD.html">ShipCAD</a>;</div><div class="line"><a name="l00044"></a><span class="lineno">   44</span>&#160;</div><div class="line"><a name="l00045"></a><span class="lineno"><a class="line" href="structShipCAD_1_1HydrostaticsData.html#a7ea81ac589a3b24424b4176c734c7a37">   45</a></span>&#160;<span class="keywordtype">void</span> HydrostaticsData::clear()</div><div class="line"><a name="l00046"></a><span class="lineno">   46</span>&#160;{</div><div class="line"><a name="l00047"></a><span class="lineno">   47</span>&#160;    model_min = model_max = wl_min = wl_max = sub_min = sub_max = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00048"></a><span class="lineno">   48</span>&#160;    waterline_plane = <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>();</div><div class="line"><a name="l00049"></a><span class="lineno">   49</span>&#160;    absolute_draft = volume = displacement = 0;</div><div class="line"><a name="l00050"></a><span class="lineno">   50</span>&#160;    center_of_buoyancy = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00051"></a><span class="lineno">   51</span>&#160;    lcb_perc = length_waterline = beam_waterline = block_coefficient = wetted_surface = 0;</div><div class="line"><a name="l00052"></a><span class="lineno">   52</span>&#160;    leak = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00053"></a><span class="lineno">   53</span>&#160;    mainframe_area = 0;</div><div class="line"><a name="l00054"></a><span class="lineno">   54</span>&#160;    mainframe_cog = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00055"></a><span class="lineno">   55</span>&#160;    mainframe_coeff = waterplane_area = 0;</div><div class="line"><a name="l00056"></a><span class="lineno">   56</span>&#160;    waterplane_cog = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00057"></a><span class="lineno">   57</span>&#160;    waterplane_entrance_angle = waterplane_coeff = 0;</div><div class="line"><a name="l00058"></a><span class="lineno">   58</span>&#160;    waterplane_mom_inertia = <a class="code" href="namespaceShipCAD.html#ab47218dccdf4c94d5989b2e5b13d8603">ZERO2</a>;</div><div class="line"><a name="l00059"></a><span class="lineno">   59</span>&#160;    km_transverse = km_longitudinal = lateral_area = 0;</div><div class="line"><a name="l00060"></a><span class="lineno">   60</span>&#160;    lateral_cog = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00061"></a><span class="lineno">   61</span>&#160;    prism_coefficient = vert_prism_coefficient = 0;</div><div class="line"><a name="l00062"></a><span class="lineno">   62</span>&#160;    sac.clear();</div><div class="line"><a name="l00063"></a><span class="lineno">   63</span>&#160;}</div><div class="line"><a name="l00064"></a><span class="lineno">   64</span>&#160;</div><div class="line"><a name="l00065"></a><span class="lineno"><a class="line" href="structShipCAD_1_1CrosscurvesData.html#a2fcb82c940ad6a13c07a25f44bbd5efd">   65</a></span>&#160;<span class="keywordtype">void</span> CrosscurvesData::clear()</div><div class="line"><a name="l00066"></a><span class="lineno">   66</span>&#160;{</div><div class="line"><a name="l00067"></a><span class="lineno">   67</span>&#160;    waterline_plane = <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>();</div><div class="line"><a name="l00068"></a><span class="lineno">   68</span>&#160;    absolute_draft = volume = displacement = 0;</div><div class="line"><a name="l00069"></a><span class="lineno">   69</span>&#160;    center_of_buoyancy = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00070"></a><span class="lineno">   70</span>&#160;    kn_sin_phi = 0;</div><div class="line"><a name="l00071"></a><span class="lineno">   71</span>&#160;}</div><div class="line"><a name="l00072"></a><span class="lineno">   72</span>&#160;</div><div class="line"><a name="l00073"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a56877acf4c33b3cab96ce381217c7a3b">   73</a></span>&#160;HydrostaticCalc::HydrostaticCalc(<a class="code" href="classShipCAD_1_1ShipCADModel.html">ShipCADModel</a>* owner)</div><div class="line"><a name="l00074"></a><span class="lineno">   74</span>&#160;    : _owner(owner), _heeling_angle(0.0), _trim(0.0),</div><div class="line"><a name="l00075"></a><span class="lineno">   75</span>&#160;      _draft(0.0), _calculated(false), _hydrostatic_type(<a class="code" href="namespaceShipCAD.html#afea51c7ee52940acebde29bf44206fe2acfe164530006cd2d42457ec37a0ac24b">fhShort</a>),</div><div class="line"><a name="l00076"></a><span class="lineno">   76</span>&#160;      _mainframe(new <a class="code" href="classShipCAD_1_1Intersection.html">Intersection</a>(owner))</div><div class="line"><a name="l00077"></a><span class="lineno">   77</span>&#160;{</div><div class="line"><a name="l00078"></a><span class="lineno">   78</span>&#160;    <span class="comment">// does nothing</span></div><div class="line"><a name="l00079"></a><span class="lineno">   79</span>&#160;}</div><div class="line"><a name="l00080"></a><span class="lineno">   80</span>&#160;</div><div class="line"><a name="l00081"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a382835ae6396b82371b605d662fd1696">   81</a></span>&#160;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a382835ae6396b82371b605d662fd1696">HydrostaticCalc::~HydrostaticCalc</a>()</div><div class="line"><a name="l00082"></a><span class="lineno">   82</span>&#160;{</div><div class="line"><a name="l00083"></a><span class="lineno">   83</span>&#160;    <span class="keyword">delete</span> _mainframe;</div><div class="line"><a name="l00084"></a><span class="lineno">   84</span>&#160;}</div><div class="line"><a name="l00085"></a><span class="lineno">   85</span>&#160;</div><div class="line"><a name="l00086"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a527c0f0526a159e3d7cb7ddd4925c295">   86</a></span>&#160;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html">HydrostaticCalc</a>* <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a527c0f0526a159e3d7cb7ddd4925c295">HydrostaticCalc::construct</a>(<a class="code" href="classShipCAD_1_1ShipCADModel.html">ShipCADModel</a>* owner)</div><div class="line"><a name="l00087"></a><span class="lineno">   87</span>&#160;{</div><div class="line"><a name="l00088"></a><span class="lineno">   88</span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html">HydrostaticCalc</a>* hc = <span class="keyword">new</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a56877acf4c33b3cab96ce381217c7a3b">HydrostaticCalc</a>(owner);</div><div class="line"><a name="l00089"></a><span class="lineno">   89</span>&#160;    <span class="keywordflow">return</span> hc;</div><div class="line"><a name="l00090"></a><span class="lineno">   90</span>&#160;}</div><div class="line"><a name="l00091"></a><span class="lineno">   91</span>&#160;    </div><div class="line"><a name="l00092"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a09403d93ebe095a41b6a29ba9b740b65">   92</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a09403d93ebe095a41b6a29ba9b740b65">HydrostaticCalc::clear</a>()</div><div class="line"><a name="l00093"></a><span class="lineno">   93</span>&#160;{</div><div class="line"><a name="l00094"></a><span class="lineno">   94</span>&#160;    _calculated = <span class="keyword">false</span>;</div><div class="line"><a name="l00095"></a><span class="lineno">   95</span>&#160;    _hydrostatic_type = <a class="code" href="namespaceShipCAD.html#afea51c7ee52940acebde29bf44206fe2acfe164530006cd2d42457ec37a0ac24b">fhShort</a>;</div><div class="line"><a name="l00096"></a><span class="lineno">   96</span>&#160;    _heeling_angle = 0.0;</div><div class="line"><a name="l00097"></a><span class="lineno">   97</span>&#160;    _trim = 0.0;</div><div class="line"><a name="l00098"></a><span class="lineno">   98</span>&#160;    _draft = 0.0;</div><div class="line"><a name="l00099"></a><span class="lineno">   99</span>&#160;    _data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a7ea81ac589a3b24424b4176c734c7a37">clear</a>();</div><div class="line"><a name="l00100"></a><span class="lineno">  100</span>&#160;    _mainframe-&gt;<a class="code" href="classShipCAD_1_1Intersection.html#a2163245dc7153d1590811ab2902d6ee4">clear</a>();</div><div class="line"><a name="l00101"></a><span class="lineno">  101</span>&#160;    _calculations.push_back(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">hcAll</a>);</div><div class="line"><a name="l00102"></a><span class="lineno">  102</span>&#160;}</div><div class="line"><a name="l00103"></a><span class="lineno">  103</span>&#160;</div><div class="line"><a name="l00104"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#abfc3e3da906e630cf6b763bd3559c630">  104</a></span>&#160;QString <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#abfc3e3da906e630cf6b763bd3559c630">HydrostaticCalc::getErrorString</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00105"></a><span class="lineno">  105</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00106"></a><span class="lineno">  106</span>&#160;    <span class="keyword">const</span> QString spc(<span class="stringliteral">&quot; &quot;</span>);</div><div class="line"><a name="l00107"></a><span class="lineno">  107</span>&#160;    QString result(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00108"></a><span class="lineno">  108</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0a0813d6e8a63bd1d17941b321715da4dd">feNothingSubmerged</a>))</div><div class="line"><a name="l00109"></a><span class="lineno">  109</span>&#160;        result.append(HydrostaticCalc::tr(<span class="stringliteral">&quot;There is no submersion&quot;</span>)+<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00110"></a><span class="lineno">  110</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>))</div><div class="line"><a name="l00111"></a><span class="lineno">  111</span>&#160;        result.append(HydrostaticCalc::tr(<span class="stringliteral">&quot;The ship is making water at&quot;</span>)+spc</div><div class="line"><a name="l00112"></a><span class="lineno">  112</span>&#160;                      +QString(<span class="stringliteral">&quot;%1&quot;</span>).arg(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">leak</a>.x(),0,<span class="charliteral">&#39;f&#39;</span>,3)+<span class="stringliteral">&quot;, &quot;</span></div><div class="line"><a name="l00113"></a><span class="lineno">  113</span>&#160;                      +QString(<span class="stringliteral">&quot;%1&quot;</span>).arg(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">leak</a>.y(),0,<span class="charliteral">&#39;f&#39;</span>,3)+<span class="stringliteral">&quot;, &quot;</span></div><div class="line"><a name="l00114"></a><span class="lineno">  114</span>&#160;                      +QString(<span class="stringliteral">&quot;%1&quot;</span>).arg(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">leak</a>.z(),0,<span class="charliteral">&#39;f&#39;</span>,3)+<span class="stringliteral">&quot;\n&quot;</span>);</div><div class="line"><a name="l00115"></a><span class="lineno">  115</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00116"></a><span class="lineno">  116</span>&#160;}</div><div class="line"><a name="l00117"></a><span class="lineno">  117</span>&#160;</div><div class="line"><a name="l00118"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">  118</a></span>&#160;<span class="keywordtype">float</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">HydrostaticCalc::getTrimAngle</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00119"></a><span class="lineno">  119</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00120"></a><span class="lineno">  120</span>&#160;    <span class="keywordtype">float</span> result = <a class="code" href="namespaceShipCAD.html#a3ad1916db38fb61e8a053f944df49cee">RadToDeg</a>(atan((-_trim * cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(_heeling_angle)))</div><div class="line"><a name="l00121"></a><span class="lineno">  121</span>&#160;                                 / _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>().<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>()));</div><div class="line"><a name="l00122"></a><span class="lineno">  122</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00123"></a><span class="lineno">  123</span>&#160;}</div><div class="line"><a name="l00124"></a><span class="lineno">  124</span>&#160;</div><div class="line"><a name="l00125"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a157563b0f0258d21a9be615e092d5b21">  125</a></span>&#160;<a class="code" href="classShipCAD_1_1Plane.html">Plane</a> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a157563b0f0258d21a9be615e092d5b21">HydrostaticCalc::getWlPlane</a>()<span class="keyword"> const</span></div><div class="line"><a name="l00126"></a><span class="lineno">  126</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00127"></a><span class="lineno">  127</span>&#160;    <span class="keywordtype">float</span> lowest_value = _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#ab16487a794947608cace81a06552b2b1">findLowestHydrostaticsPoint</a>();</div><div class="line"><a name="l00128"></a><span class="lineno">  128</span>&#160;    QVector3D p1(0.0, 0.0, lowest_value + (_draft - 0.5 * _trim));</div><div class="line"><a name="l00129"></a><span class="lineno">  129</span>&#160;    QVector3D p2(_owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>().<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>(), 0.0,</div><div class="line"><a name="l00130"></a><span class="lineno">  130</span>&#160;                 lowest_value + (_draft + 0.5 * _trim));</div><div class="line"><a name="l00131"></a><span class="lineno">  131</span>&#160;    QVector3D p3(_owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>().<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>(),</div><div class="line"><a name="l00132"></a><span class="lineno">  132</span>&#160;                 cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-_heeling_angle)),</div><div class="line"><a name="l00133"></a><span class="lineno">  133</span>&#160;                 lowest_value + (_draft + 0.5 * _trim) - sin(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-_heeling_angle)));</div><div class="line"><a name="l00134"></a><span class="lineno">  134</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>(p1, p2, p3);</div><div class="line"><a name="l00135"></a><span class="lineno">  135</span>&#160;}</div><div class="line"><a name="l00136"></a><span class="lineno">  136</span>&#160;</div><div class="line"><a name="l00137"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">  137</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">HydrostaticCalc::setCalculated</a>(<span class="keywordtype">bool</span> calc)</div><div class="line"><a name="l00138"></a><span class="lineno">  138</span>&#160;{</div><div class="line"><a name="l00139"></a><span class="lineno">  139</span>&#160;    _calculated = calc;</div><div class="line"><a name="l00140"></a><span class="lineno">  140</span>&#160;    <span class="keywordflow">if</span> (!_calculated) {</div><div class="line"><a name="l00141"></a><span class="lineno">  141</span>&#160;        _errors.clear();</div><div class="line"><a name="l00142"></a><span class="lineno">  142</span>&#160;        _data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a7ea81ac589a3b24424b4176c734c7a37">clear</a>();</div><div class="line"><a name="l00143"></a><span class="lineno">  143</span>&#160;        _mainframe-&gt;<a class="code" href="classShipCAD_1_1Intersection.html#a2163245dc7153d1590811ab2902d6ee4">clear</a>();</div><div class="line"><a name="l00144"></a><span class="lineno">  144</span>&#160;    }</div><div class="line"><a name="l00145"></a><span class="lineno">  145</span>&#160;}</div><div class="line"><a name="l00146"></a><span class="lineno">  146</span>&#160;</div><div class="line"><a name="l00147"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a6528fe532bbb1121c73972906d108835">  147</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a6528fe532bbb1121c73972906d108835">HydrostaticCalc::setDraft</a>(<span class="keywordtype">float</span> draft)</div><div class="line"><a name="l00148"></a><span class="lineno">  148</span>&#160;{</div><div class="line"><a name="l00149"></a><span class="lineno">  149</span>&#160;    <span class="keywordflow">if</span> (draft != _draft) {</div><div class="line"><a name="l00150"></a><span class="lineno">  150</span>&#160;        _draft = draft;</div><div class="line"><a name="l00151"></a><span class="lineno">  151</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00152"></a><span class="lineno">  152</span>&#160;    }</div><div class="line"><a name="l00153"></a><span class="lineno">  153</span>&#160;}</div><div class="line"><a name="l00154"></a><span class="lineno">  154</span>&#160;</div><div class="line"><a name="l00155"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#ae6bf118e2e5e89a8e8d7ea7675fdee22">  155</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ae6bf118e2e5e89a8e8d7ea7675fdee22">HydrostaticCalc::setHeelingAngle</a>(<span class="keywordtype">float</span> angle)</div><div class="line"><a name="l00156"></a><span class="lineno">  156</span>&#160;{</div><div class="line"><a name="l00157"></a><span class="lineno">  157</span>&#160;    <span class="keywordflow">if</span> (angle != _heeling_angle) {</div><div class="line"><a name="l00158"></a><span class="lineno">  158</span>&#160;        _heeling_angle = angle;</div><div class="line"><a name="l00159"></a><span class="lineno">  159</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00160"></a><span class="lineno">  160</span>&#160;    }</div><div class="line"><a name="l00161"></a><span class="lineno">  161</span>&#160;}</div><div class="line"><a name="l00162"></a><span class="lineno">  162</span>&#160;</div><div class="line"><a name="l00163"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a61df8d7421f2900cbc18a6565963c66e">  163</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a61df8d7421f2900cbc18a6565963c66e">HydrostaticCalc::setHydrostaticType</a>(<a class="code" href="namespaceShipCAD.html#afea51c7ee52940acebde29bf44206fe2">hydrostatic_type_t</a> ty)</div><div class="line"><a name="l00164"></a><span class="lineno">  164</span>&#160;{</div><div class="line"><a name="l00165"></a><span class="lineno">  165</span>&#160;    <span class="keywordflow">if</span> (ty != _hydrostatic_type) {</div><div class="line"><a name="l00166"></a><span class="lineno">  166</span>&#160;        _hydrostatic_type = ty;</div><div class="line"><a name="l00167"></a><span class="lineno">  167</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00168"></a><span class="lineno">  168</span>&#160;    }</div><div class="line"><a name="l00169"></a><span class="lineno">  169</span>&#160;}</div><div class="line"><a name="l00170"></a><span class="lineno">  170</span>&#160;</div><div class="line"><a name="l00171"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#ace579596fa77d8e3ea4f854ca033ed83">  171</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ace579596fa77d8e3ea4f854ca033ed83">HydrostaticCalc::setTrim</a>(<span class="keywordtype">float</span> trim)</div><div class="line"><a name="l00172"></a><span class="lineno">  172</span>&#160;{</div><div class="line"><a name="l00173"></a><span class="lineno">  173</span>&#160;    <span class="keywordflow">if</span> (trim != _trim) {</div><div class="line"><a name="l00174"></a><span class="lineno">  174</span>&#160;        _trim = trim;</div><div class="line"><a name="l00175"></a><span class="lineno">  175</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00176"></a><span class="lineno">  176</span>&#160;    }</div><div class="line"><a name="l00177"></a><span class="lineno">  177</span>&#160;}</div><div class="line"><a name="l00178"></a><span class="lineno">  178</span>&#160;</div><div class="line"><a name="l00179"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">  179</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">HydrostaticCalc::hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0">hydrostatics_error_t</a> error)<span class="keyword"> const</span></div><div class="line"><a name="l00180"></a><span class="lineno">  180</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00181"></a><span class="lineno">  181</span>&#160;    <span class="keywordflow">return</span> find(_errors.begin(), _errors.end(), error) != _errors.end();</div><div class="line"><a name="l00182"></a><span class="lineno">  182</span>&#160;}</div><div class="line"><a name="l00183"></a><span class="lineno">  183</span>&#160;</div><div class="line"><a name="l00184"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">  184</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">HydrostaticCalc::hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fce">hydrostatics_calc_t</a> ty)<span class="keyword"> const</span></div><div class="line"><a name="l00185"></a><span class="lineno">  185</span>&#160;<span class="keyword"></span>{</div><div class="line"><a name="l00186"></a><span class="lineno">  186</span>&#160;    <span class="keywordflow">return</span> find(_calculations.begin(), _calculations.end(), ty) != _calculations.end();</div><div class="line"><a name="l00187"></a><span class="lineno">  187</span>&#160;}</div><div class="line"><a name="l00188"></a><span class="lineno">  188</span>&#160;</div><div class="line"><a name="l00189"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a919bce0b984cbef1c59534d6e9fec46f">  189</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a919bce0b984cbef1c59534d6e9fec46f">HydrostaticCalc::addData</a>(QStringList&amp; strings, <a class="code" href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3">hydrostatics_mode_t</a> mode, QChar sep)</div><div class="line"><a name="l00190"></a><span class="lineno">  190</span>&#160;{</div><div class="line"><a name="l00191"></a><span class="lineno">  191</span>&#160;    <span class="keyword">const</span> QString spc4 = <span class="stringliteral">&quot;    &quot;</span>;</div><div class="line"><a name="l00192"></a><span class="lineno">  192</span>&#160;    <span class="keyword">const</span> QString vb = <span class="stringliteral">&quot; | &quot;</span>;</div><div class="line"><a name="l00193"></a><span class="lineno">  193</span>&#160;    <a class="code" href="structShipCAD_1_1LayerProperties.html">LayerProperties</a> total;</div><div class="line"><a name="l00194"></a><span class="lineno">  194</span>&#160;</div><div class="line"><a name="l00195"></a><span class="lineno">  195</span>&#160;    <a class="code" href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5">unit_type_t</a> u = _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>().<a class="code" href="classShipCAD_1_1ProjectSettings.html#af9e707de58afaa87f639c2426dbb1161">getUnits</a>();</div><div class="line"><a name="l00196"></a><span class="lineno">  196</span>&#160;    <span class="keywordflow">if</span> (!<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a875b9708e91db4a8f06ddbcc8a22d830">isCalculated</a>())</div><div class="line"><a name="l00197"></a><span class="lineno">  197</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ab0c8f5dc5c576e6e9eae5fb27fd5bdd0">calculate</a>();</div><div class="line"><a name="l00198"></a><span class="lineno">  198</span>&#160;    <span class="keywordflow">if</span> (_errors.size() == 0) {</div><div class="line"><a name="l00199"></a><span class="lineno">  199</span>&#160;        <span class="keywordflow">if</span> (mode == <a class="code" href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3ab322857f69d00b378f611acbb12bc663">fhSingleCalculation</a>) {</div><div class="line"><a name="l00200"></a><span class="lineno">  200</span>&#160;            <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a95e0e1aa5d11f49cb0f0553ba45af085">addHeader</a>(strings);</div><div class="line"><a name="l00201"></a><span class="lineno">  201</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Volume properties&quot;</span>)+<span class="charliteral">&#39;:&#39;</span>);</div><div class="line"><a name="l00202"></a><span class="lineno">  202</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Displaced volume&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a0758fd8275aafe6ad813d2a361281bf2">VolStr</a>(u));</div><div class="line"><a name="l00203"></a><span class="lineno">  203</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Displacement&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a92d1a8a97eb9b21bad485e40ac4461a0">displacement</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a62749df66958d1389c3cc6f6f03d42fb">WeightStr</a>(u));</div><div class="line"><a name="l00204"></a><span class="lineno">  204</span>&#160;            <span class="keywordflow">if</span> (_owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>().<a class="code" href="classShipCAD_1_1ProjectSettings.html#aef0458c7bfa6e484a155e78eca0d0202">getHydrostaticCoefficients</a>() == <a class="code" href="namespaceShipCAD.html#a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2">fcActualData</a>) {</div><div class="line"><a name="l00205"></a><span class="lineno">  205</span>&#160;                strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Total length of submerged body&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab3a6e316a991426c74673025439f123c">sub_max</a>.x()-_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2d0a1e5f6bf98f8eceb958e5f7e7c73e">sub_min</a>.x(),3,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00206"></a><span class="lineno">  206</span>&#160;                strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Total beam of submerged body&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab3a6e316a991426c74673025439f123c">sub_max</a>.y()-_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2d0a1e5f6bf98f8eceb958e5f7e7c73e">sub_min</a>.y(),3,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00207"></a><span class="lineno">  207</span>&#160;            }</div><div class="line"><a name="l00208"></a><span class="lineno">  208</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Block coefficient&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ac59c717b9869f0aacca4305fd81d4882">block_coefficient</a>,4,12));</div><div class="line"><a name="l00209"></a><span class="lineno">  209</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Prismatic coefficient&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acabee310fcde293fcb0d9a5fd5effe27">prism_coefficient</a>,4,12));</div><div class="line"><a name="l00210"></a><span class="lineno">  210</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Vert. prismatic coefficient&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2a7fc6a194bc1e78ecce8ab16512d1eb">vert_prism_coefficient</a>,4,12));</div><div class="line"><a name="l00211"></a><span class="lineno">  211</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Wetted surface area&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ad4b78176732ea80000adb94b5b5669f3">wetted_surface</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">AreaStr</a>(u));</div><div class="line"><a name="l00212"></a><span class="lineno">  212</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal center of buoyancy&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>.x(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00213"></a><span class="lineno">  213</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal center of buoyancy&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a783b71d811732bbc002b52f21d63c83a">lcb_perc</a>,3,12)+sep+<span class="stringliteral">&quot;[%]&quot;</span>);</div><div class="line"><a name="l00214"></a><span class="lineno">  214</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Vertical center of buoyancy&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>.z(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00215"></a><span class="lineno">  215</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship properties&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00216"></a><span class="lineno">  216</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship section area&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab2b49d5dea89ae998116c8ff4cac2b53">mainframe_area</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">AreaStr</a>(u));</div><div class="line"><a name="l00217"></a><span class="lineno">  217</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship coefficient&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a4208b97fe6110516d71e67708186897a">mainframe_coeff</a>,4,12));</div><div class="line"><a name="l00218"></a><span class="lineno">  218</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane properties&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00219"></a><span class="lineno">  219</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Length on waterline&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">length_waterline</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00220"></a><span class="lineno">  220</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Beam on waterline&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab79755f5814572be0dfd3ae3ba214fca">beam_waterline</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00221"></a><span class="lineno">  221</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane area&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a5f3432f4d790bbb9c4d75502cb15b7f0">waterplane_area</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">AreaStr</a>(u));</div><div class="line"><a name="l00222"></a><span class="lineno">  222</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane coefficient&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a4d5eb630367999a611b95dd0d2c2242c">waterplane_coeff</a>,4,12));</div><div class="line"><a name="l00223"></a><span class="lineno">  223</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane center of floatation&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ac100876d13ae75147585c5c0f80801fe">waterplane_cog</a>.x(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00224"></a><span class="lineno">  224</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Entrance angle&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a3e22cf4f03f02a3c0d14e7f66610fd80">waterplane_entrance_angle</a>,-1,12)+sep+<span class="stringliteral">&quot;[degr.]&quot;</span>);</div><div class="line"><a name="l00225"></a><span class="lineno">  225</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Transverse moment of inertia&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2a662521564e9c0160c15acf9d3121f9">waterplane_mom_inertia</a>.x(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a01d1e42109b5645919c004f6d7a30b68">InertiaStr</a>(u));</div><div class="line"><a name="l00226"></a><span class="lineno">  226</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal moment of inertia&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2a662521564e9c0160c15acf9d3121f9">waterplane_mom_inertia</a>.y(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a01d1e42109b5645919c004f6d7a30b68">InertiaStr</a>(u));</div><div class="line"><a name="l00227"></a><span class="lineno">  227</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Initial stability&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00228"></a><span class="lineno">  228</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Transverse metacentric height&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#adbadaf4eafa63f1f10778f4c3e1f61a4">km_transverse</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00229"></a><span class="lineno">  229</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal metacentric height&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a0a51e62f7d169fa892eaabc6a1937256">km_longitudinal</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00230"></a><span class="lineno">  230</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Lateral plane&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00231"></a><span class="lineno">  231</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Lateral area&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1ba65b28e4351a4d97bc64cd11ddab90">lateral_area</a>,-1,12)+sep+<a class="code" href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">AreaStr</a>(u));</div><div class="line"><a name="l00232"></a><span class="lineno">  232</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal center of effort&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#adc0c4f2f0c5b110a968e45642dc5eeeb">lateral_cog</a>.x(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00233"></a><span class="lineno">  233</span>&#160;            strings.push_back(spc4+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Vertical center of effort&quot;</span>),38)+<span class="stringliteral">&quot; : &quot;</span>+sep+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#adc0c4f2f0c5b110a968e45642dc5eeeb">lateral_cog</a>.z(),-1,12)+sep+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00234"></a><span class="lineno">  234</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00235"></a><span class="lineno">  235</span>&#160;            <span class="keywordflow">if</span> (strings.size() == 0) {</div><div class="line"><a name="l00236"></a><span class="lineno">  236</span>&#160;                <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a95e0e1aa5d11f49cb0f0553ba45af085">addHeader</a>(strings);</div><div class="line"><a name="l00237"></a><span class="lineno">  237</span>&#160;                strings.push_back(<span class="stringliteral">&quot; |  Draft |   Trim  |   Lwl   |   Bwl  |   Vol   |  Displ  |   LCB   |   VCB  |   CB   |   AM   |   CM   |   AW   |   CW   |   CP   |    S   |  KMtrv | KMlong | &quot;</span>);</div><div class="line"><a name="l00238"></a><span class="lineno">  238</span>&#160;                <span class="keywordflow">if</span> (u == <a class="code" href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5a77b7e6068aae48ecd768c4a6e7637fe7">fuImperial</a>)</div><div class="line"><a name="l00239"></a><span class="lineno">  239</span>&#160;                    strings.push_back(<span class="stringliteral">&quot; |  [ft]  |   [ft]  |   [ft]  |  [ft]  |  [ft3]  |   [t]   |   [ft]  |  [ft]  |        |  [ft2] |        |  [ft2] |        |        |  [ft2] |  [ft]  |  [ft]  | &quot;</span>);</div><div class="line"><a name="l00240"></a><span class="lineno">  240</span>&#160;                <span class="keywordflow">else</span></div><div class="line"><a name="l00241"></a><span class="lineno">  241</span>&#160;                    strings.push_back(<span class="stringliteral">&quot; |  [m]   |   [m]   |   [m]   |   [m]  |   [m3]  |   [t]   |   [m]   |   [m]  |        |  [m2]  |        |  [m2]  |        |        |  [m2]  |   [m]  |   [m]  | &quot;</span>);</div><div class="line"><a name="l00242"></a><span class="lineno">  242</span>&#160;                strings.push_back(<span class="stringliteral">&quot; |--------+---------+---------+--------+---------+---------+---------+--------+--------+--------+--------+--------+--------+--------+--------+--------+--------| &quot;</span>);</div><div class="line"><a name="l00243"></a><span class="lineno">  243</span>&#160;            }</div><div class="line"><a name="l00244"></a><span class="lineno">  244</span>&#160;            strings.push_back(vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_draft,3,6)+vb</div><div class="line"><a name="l00245"></a><span class="lineno">  245</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_trim,3,7)+vb</div><div class="line"><a name="l00246"></a><span class="lineno">  246</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">length_waterline</a>,-1,7)+vb</div><div class="line"><a name="l00247"></a><span class="lineno">  247</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab79755f5814572be0dfd3ae3ba214fca">beam_waterline</a>,-1,6)+vb</div><div class="line"><a name="l00248"></a><span class="lineno">  248</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a>,-1,7)+vb</div><div class="line"><a name="l00249"></a><span class="lineno">  249</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a92d1a8a97eb9b21bad485e40ac4461a0">displacement</a>,-1,7)+vb</div><div class="line"><a name="l00250"></a><span class="lineno">  250</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>.x(),-1,7)+vb</div><div class="line"><a name="l00251"></a><span class="lineno">  251</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>.z(),-1,6)+vb</div><div class="line"><a name="l00252"></a><span class="lineno">  252</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ac59c717b9869f0aacca4305fd81d4882">block_coefficient</a>,4,6)+vb</div><div class="line"><a name="l00253"></a><span class="lineno">  253</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab2b49d5dea89ae998116c8ff4cac2b53">mainframe_area</a>,-1,6)+vb</div><div class="line"><a name="l00254"></a><span class="lineno">  254</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a4208b97fe6110516d71e67708186897a">mainframe_coeff</a>,4,6)+vb</div><div class="line"><a name="l00255"></a><span class="lineno">  255</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a5f3432f4d790bbb9c4d75502cb15b7f0">waterplane_area</a>,-1,6)+vb</div><div class="line"><a name="l00256"></a><span class="lineno">  256</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a4d5eb630367999a611b95dd0d2c2242c">waterplane_coeff</a>,4,6)+vb</div><div class="line"><a name="l00257"></a><span class="lineno">  257</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acabee310fcde293fcb0d9a5fd5effe27">prism_coefficient</a>,4,6)+vb</div><div class="line"><a name="l00258"></a><span class="lineno">  258</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ad4b78176732ea80000adb94b5b5669f3">wetted_surface</a>,-1,6)+vb</div><div class="line"><a name="l00259"></a><span class="lineno">  259</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#adbadaf4eafa63f1f10778f4c3e1f61a4">km_transverse</a>,-1,6)+vb</div><div class="line"><a name="l00260"></a><span class="lineno">  260</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a0a51e62f7d169fa892eaabc6a1937256">km_longitudinal</a>,-1,6)+vb);</div><div class="line"><a name="l00261"></a><span class="lineno">  261</span>&#160;        }</div><div class="line"><a name="l00262"></a><span class="lineno">  262</span>&#160;    } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00263"></a><span class="lineno">  263</span>&#160;        strings.push_back(<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#abfc3e3da906e630cf6b763bd3559c630">getErrorString</a>());</div><div class="line"><a name="l00264"></a><span class="lineno">  264</span>&#160;    }</div><div class="line"><a name="l00265"></a><span class="lineno">  265</span>&#160;    <a class="code" href="classShipCAD_1_1SubdivisionSurface.html">SubdivisionSurface</a>* surf = _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">getSurface</a>();</div><div class="line"><a name="l00266"></a><span class="lineno">  266</span>&#160;    <span class="keywordflow">if</span> (mode == <a class="code" href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3ab322857f69d00b378f611acbb12bc663">fhSingleCalculation</a>) {</div><div class="line"><a name="l00267"></a><span class="lineno">  267</span>&#160;        <span class="comment">// check if any layers are present to show</span></div><div class="line"><a name="l00268"></a><span class="lineno">  268</span>&#160;        <span class="keywordtype">size_t</span> n = 0;</div><div class="line"><a name="l00269"></a><span class="lineno">  269</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a011480014cfb68430c9f60aff474936c">numberOfLayers</a>(); i++)</div><div class="line"><a name="l00270"></a><span class="lineno">  270</span>&#160;            <span class="keywordflow">if</span> (surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#ad0d77de06b53814e248fc9bbfa908252">numberOfFaces</a>() &gt; 0)</div><div class="line"><a name="l00271"></a><span class="lineno">  271</span>&#160;                n++;</div><div class="line"><a name="l00272"></a><span class="lineno">  272</span>&#160;        <span class="keywordflow">if</span> (n &gt; 0) {</div><div class="line"><a name="l00273"></a><span class="lineno">  273</span>&#160;            strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00274"></a><span class="lineno">  274</span>&#160;            strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00275"></a><span class="lineno">  275</span>&#160;            strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;The following layer properties are calculated for both sides of the ship&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00276"></a><span class="lineno">  276</span>&#160;            strings.push_back(<span class="stringliteral">&quot;|&quot;</span>+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<span class="stringliteral">&quot;&quot;</span>,10)</div><div class="line"><a name="l00277"></a><span class="lineno">  277</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Layer&quot;</span>),14)+vb</div><div class="line"><a name="l00278"></a><span class="lineno">  278</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Area&quot;</span>),6)+vb</div><div class="line"><a name="l00279"></a><span class="lineno">  279</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Thickness&quot;</span>),9)+vb</div><div class="line"><a name="l00280"></a><span class="lineno">  280</span>&#160;                              +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Weight&quot;</span>),8)+vb</div><div class="line"><a name="l00281"></a><span class="lineno">  281</span>&#160;                              +<span class="stringliteral">&quot; COG X  |  COG Y  |  COG Z  |&quot;</span>);</div><div class="line"><a name="l00282"></a><span class="lineno">  282</span>&#160;            strings.push_back(<span class="stringliteral">&quot;| &quot;</span>+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<span class="stringliteral">&quot;&quot;</span>,23)</div><div class="line"><a name="l00283"></a><span class="lineno">  283</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<a class="code" href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">AreaStr</a>(u),6)</div><div class="line"><a name="l00284"></a><span class="lineno">  284</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<span class="stringliteral">&quot;&quot;</span>,9)</div><div class="line"><a name="l00285"></a><span class="lineno">  285</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<a class="code" href="namespaceShipCAD.html#a62749df66958d1389c3cc6f6f03d42fb">WeightStr</a>(u),8)</div><div class="line"><a name="l00286"></a><span class="lineno">  286</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u),7)</div><div class="line"><a name="l00287"></a><span class="lineno">  287</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u),7)</div><div class="line"><a name="l00288"></a><span class="lineno">  288</span>&#160;                              +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u),7)+<span class="stringliteral">&quot; |&quot;</span>);</div><div class="line"><a name="l00289"></a><span class="lineno">  289</span>&#160;            strings.push_back(<span class="stringliteral">&quot;|-------------------------|--------|-----------|----------|---------|---------|---------|&quot;</span>);</div><div class="line"><a name="l00290"></a><span class="lineno">  290</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a011480014cfb68430c9f60aff474936c">numberOfLayers</a>(); i++) {</div><div class="line"><a name="l00291"></a><span class="lineno">  291</span>&#160;                <a class="code" href="structShipCAD_1_1LayerProperties.html">LayerProperties</a> p = surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#aee60763cd9524debb45f4a04e46676f2">getSurfaceProperties</a>();</div><div class="line"><a name="l00292"></a><span class="lineno">  292</span>&#160;                <span class="keywordflow">if</span> (u == <a class="code" href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5a77b7e6068aae48ecd768c4a6e7637fe7">fuImperial</a>)</div><div class="line"><a name="l00293"></a><span class="lineno">  293</span>&#160;                    p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a> /= (12*2240);</div><div class="line"><a name="l00294"></a><span class="lineno">  294</span>&#160;                <span class="keywordflow">else</span></div><div class="line"><a name="l00295"></a><span class="lineno">  295</span>&#160;                    p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a> /= 1000;</div><div class="line"><a name="l00296"></a><span class="lineno">  296</span>&#160;                QString str(surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a22eacfdf763840d534d45b18b789f8c7">getName</a>());</div><div class="line"><a name="l00297"></a><span class="lineno">  297</span>&#160;                <span class="keywordflow">if</span> (str.length() &gt; 23)</div><div class="line"><a name="l00298"></a><span class="lineno">  298</span>&#160;                    str.truncate(23);</div><div class="line"><a name="l00299"></a><span class="lineno">  299</span>&#160;                strings.push_back(<span class="stringliteral">&quot;| &quot;</span>+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(str, 23)</div><div class="line"><a name="l00300"></a><span class="lineno">  300</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(p.<a class="code" href="structShipCAD_1_1LayerProperties.html#aff6dab68937efc1abd7bb5066373f514">surface_area</a>,-1,6)</div><div class="line"><a name="l00301"></a><span class="lineno">  301</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a4923525b6c8c111be4959e2fac45d24f">getThickness</a>(),3,9)</div><div class="line"><a name="l00302"></a><span class="lineno">  302</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a>,3,8)</div><div class="line"><a name="l00303"></a><span class="lineno">  303</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.x(),3,7)</div><div class="line"><a name="l00304"></a><span class="lineno">  304</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.y(),3,7)</div><div class="line"><a name="l00305"></a><span class="lineno">  305</span>&#160;                                  +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.z(),3,7) + <span class="stringliteral">&quot; |&quot;</span>);</div><div class="line"><a name="l00306"></a><span class="lineno">  306</span>&#160;                total.<a class="code" href="structShipCAD_1_1LayerProperties.html#aff6dab68937efc1abd7bb5066373f514">surface_area</a> += p.<a class="code" href="structShipCAD_1_1LayerProperties.html#aff6dab68937efc1abd7bb5066373f514">surface_area</a>;</div><div class="line"><a name="l00307"></a><span class="lineno">  307</span>&#160;                total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a> += p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a> * p.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>;</div><div class="line"><a name="l00308"></a><span class="lineno">  308</span>&#160;            }</div><div class="line"><a name="l00309"></a><span class="lineno">  309</span>&#160;            <span class="keywordflow">if</span> (n &gt; 1) {</div><div class="line"><a name="l00310"></a><span class="lineno">  310</span>&#160;                <span class="comment">// if more than 1 layer added, the show the properties of all layers together</span></div><div class="line"><a name="l00311"></a><span class="lineno">  311</span>&#160;                strings.push_back(<span class="stringliteral">&quot;|-------------------------|--------|-----------|----------|---------|---------|---------|&quot;</span>);</div><div class="line"><a name="l00312"></a><span class="lineno">  312</span>&#160;                <span class="keywordflow">if</span> (total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a> != 0) {</div><div class="line"><a name="l00313"></a><span class="lineno">  313</span>&#160;                    total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a> += total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a> / total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a>;</div><div class="line"><a name="l00314"></a><span class="lineno">  314</span>&#160;                }</div><div class="line"><a name="l00315"></a><span class="lineno">  315</span>&#160;                <span class="keyword">const</span> QString spc3(<span class="stringliteral">&quot;   &quot;</span>);</div><div class="line"><a name="l00316"></a><span class="lineno">  316</span>&#160;                strings.push_back(<span class="stringliteral">&quot;  &quot;</span>+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Total&quot;</span>),23)</div><div class="line"><a name="l00317"></a><span class="lineno">  317</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(total.<a class="code" href="structShipCAD_1_1LayerProperties.html#aff6dab68937efc1abd7bb5066373f514">surface_area</a>,-1,6)</div><div class="line"><a name="l00318"></a><span class="lineno">  318</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(<span class="stringliteral">&quot;&quot;</span>,9)</div><div class="line"><a name="l00319"></a><span class="lineno">  319</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">weight</a>,3,8)</div><div class="line"><a name="l00320"></a><span class="lineno">  320</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.x(),3,7)</div><div class="line"><a name="l00321"></a><span class="lineno">  321</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.y(),3,7)</div><div class="line"><a name="l00322"></a><span class="lineno">  322</span>&#160;                                  +spc3+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(total.<a class="code" href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">surface_center_of_gravity</a>.z(),3,7));</div><div class="line"><a name="l00323"></a><span class="lineno">  323</span>&#160;                <span class="comment">// add sectional area data</span></div><div class="line"><a name="l00324"></a><span class="lineno">  324</span>&#160;                <span class="keywordflow">if</span> (_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">sac</a>.size() &gt; 0) {</div><div class="line"><a name="l00325"></a><span class="lineno">  325</span>&#160;                    strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00326"></a><span class="lineno">  326</span>&#160;                    strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00327"></a><span class="lineno">  327</span>&#160;                    strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;Sectional areas&quot;</span>)+<span class="stringliteral">&quot;:&quot;</span>);</div><div class="line"><a name="l00328"></a><span class="lineno">  328</span>&#160;                    strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00329"></a><span class="lineno">  329</span>&#160;                    strings.push_back(vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Location&quot;</span>),9)</div><div class="line"><a name="l00330"></a><span class="lineno">  330</span>&#160;                                      +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Area&quot;</span>),8)+vb);</div><div class="line"><a name="l00331"></a><span class="lineno">  331</span>&#160;                    <span class="keywordflow">if</span> (u == <a class="code" href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5a77b7e6068aae48ecd768c4a6e7637fe7">fuImperial</a>)</div><div class="line"><a name="l00332"></a><span class="lineno">  332</span>&#160;                        strings.push_back(<span class="stringliteral">&quot; |    [ft]   |   [ft2]  |&quot;</span>);</div><div class="line"><a name="l00333"></a><span class="lineno">  333</span>&#160;                    <span class="keywordflow">else</span></div><div class="line"><a name="l00334"></a><span class="lineno">  334</span>&#160;                        strings.push_back(<span class="stringliteral">&quot; |    [m]    |    [m2]  |&quot;</span>);</div><div class="line"><a name="l00335"></a><span class="lineno">  335</span>&#160;                    strings.push_back(<span class="stringliteral">&quot; |-----------+----------|&quot;</span>);</div><div class="line"><a name="l00336"></a><span class="lineno">  336</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">sac</a>.size(); i++) {</div><div class="line"><a name="l00337"></a><span class="lineno">  337</span>&#160;                        <span class="keywordtype">float</span> position = _data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">sac</a>[i].x();</div><div class="line"><a name="l00338"></a><span class="lineno">  338</span>&#160;                        strings.push_back(vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(position,3,9)</div><div class="line"><a name="l00339"></a><span class="lineno">  339</span>&#160;                                          +vb+<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">sac</a>[i].y(),3,8)</div><div class="line"><a name="l00340"></a><span class="lineno">  340</span>&#160;                                          +vb);</div><div class="line"><a name="l00341"></a><span class="lineno">  341</span>&#160;                    }</div><div class="line"><a name="l00342"></a><span class="lineno">  342</span>&#160;                    strings.push_back(<span class="stringliteral">&quot; |-----------+----------|&quot;</span>);</div><div class="line"><a name="l00343"></a><span class="lineno">  343</span>&#160;                }</div><div class="line"><a name="l00344"></a><span class="lineno">  344</span>&#160;            }</div><div class="line"><a name="l00345"></a><span class="lineno">  345</span>&#160;        }</div><div class="line"><a name="l00346"></a><span class="lineno">  346</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aa4077ad7205ef509d3a54edb8e04b8b7">addFooter</a>(strings, mode);</div><div class="line"><a name="l00347"></a><span class="lineno">  347</span>&#160;    }</div><div class="line"><a name="l00348"></a><span class="lineno">  348</span>&#160;}</div><div class="line"><a name="l00349"></a><span class="lineno">  349</span>&#160;</div><div class="line"><a name="l00350"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a95e0e1aa5d11f49cb0f0553ba45af085">  350</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a95e0e1aa5d11f49cb0f0553ba45af085">HydrostaticCalc::addHeader</a>(QStringList&amp; strings)</div><div class="line"><a name="l00351"></a><span class="lineno">  351</span>&#160;{</div><div class="line"><a name="l00352"></a><span class="lineno">  352</span>&#160;    <span class="keyword">const</span> QString sep(<span class="stringliteral">&quot; : &quot;</span>);</div><div class="line"><a name="l00353"></a><span class="lineno">  353</span>&#160;    <span class="keyword">const</span> QString spc(<span class="stringliteral">&quot; &quot;</span>);</div><div class="line"><a name="l00354"></a><span class="lineno">  354</span>&#160;</div><div class="line"><a name="l00355"></a><span class="lineno">  355</span>&#160;    <a class="code" href="classShipCAD_1_1ProjectSettings.html">ProjectSettings</a>&amp; ps = _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>();</div><div class="line"><a name="l00356"></a><span class="lineno">  356</span>&#160;    <a class="code" href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5">unit_type_t</a> u = ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#af9e707de58afaa87f639c2426dbb1161">getUnits</a>();</div><div class="line"><a name="l00357"></a><span class="lineno">  357</span>&#160;    </div><div class="line"><a name="l00358"></a><span class="lineno">  358</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Project&quot;</span>),21)+sep</div><div class="line"><a name="l00359"></a><span class="lineno">  359</span>&#160;                      +ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#adeadfbedd4733c4c242dafbe55935397">getName</a>());</div><div class="line"><a name="l00360"></a><span class="lineno">  360</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Designer&quot;</span>),21)+sep</div><div class="line"><a name="l00361"></a><span class="lineno">  361</span>&#160;                      +ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a03844b7fff96e8ade21a0dc5ff72a1b6">getDesigner</a>());</div><div class="line"><a name="l00362"></a><span class="lineno">  362</span>&#160;    <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a8db64934b729181fbf65b767f6260bff">getFileCreatedBy</a>().length() != 0)</div><div class="line"><a name="l00363"></a><span class="lineno">  363</span>&#160;        strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Created by&quot;</span>),21)+sep</div><div class="line"><a name="l00364"></a><span class="lineno">  364</span>&#160;                          +ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a8db64934b729181fbf65b767f6260bff">getFileCreatedBy</a>());</div><div class="line"><a name="l00365"></a><span class="lineno">  365</span>&#160;    <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a7687e8e358e8deb57e363ad8e5cfef17">getComment</a>().length() != 0)</div><div class="line"><a name="l00366"></a><span class="lineno">  366</span>&#160;        strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Comment&quot;</span>),21)+sep</div><div class="line"><a name="l00367"></a><span class="lineno">  367</span>&#160;                          +ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a7687e8e358e8deb57e363ad8e5cfef17">getComment</a>());</div><div class="line"><a name="l00368"></a><span class="lineno">  368</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Filename&quot;</span>),21)</div><div class="line"><a name="l00369"></a><span class="lineno">  369</span>&#160;                      +sep+_owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a4c29a9dd9e31c652a82b6398c8f7b983">getFilename</a>());</div><div class="line"><a name="l00370"></a><span class="lineno">  370</span>&#160;    strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00371"></a><span class="lineno">  371</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Design length&quot;</span>),21)+sep</div><div class="line"><a name="l00372"></a><span class="lineno">  372</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>(),-1,10)+spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00373"></a><span class="lineno">  373</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Length over all&quot;</span>),21)+sep</div><div class="line"><a name="l00374"></a><span class="lineno">  374</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a9319fb2ad054a595b6e3b3fd4059a3ae">model_max</a>.x() - _data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acd93669bc08fa097974d41fbaf4dc81f">model_min</a>.x(),-1,10)</div><div class="line"><a name="l00375"></a><span class="lineno">  375</span>&#160;                      +spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00376"></a><span class="lineno">  376</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Design beam&quot;</span>),21)+sep</div><div class="line"><a name="l00377"></a><span class="lineno">  377</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>(),-1,10)+spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00378"></a><span class="lineno">  378</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Beam over all&quot;</span>),21)+sep</div><div class="line"><a name="l00379"></a><span class="lineno">  379</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a9319fb2ad054a595b6e3b3fd4059a3ae">model_max</a>.y(),-1,10)</div><div class="line"><a name="l00380"></a><span class="lineno">  380</span>&#160;                      +spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00381"></a><span class="lineno">  381</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Design draft&quot;</span>),21)+sep</div><div class="line"><a name="l00382"></a><span class="lineno">  382</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a0fe6c2dde04c7172c334736516950b51">getDraft</a>(),-1,10)+spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00383"></a><span class="lineno">  383</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship location&quot;</span>),21)+sep</div><div class="line"><a name="l00384"></a><span class="lineno">  384</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a194fe12f81ed80e691e8a89c88d91a0b">getMainframeLocation</a>(),-1,10)+spc+<a class="code" href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">LengthStr</a>(u));</div><div class="line"><a name="l00385"></a><span class="lineno">  385</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Water density&quot;</span>),21)+sep</div><div class="line"><a name="l00386"></a><span class="lineno">  386</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad6289f32228b3a33c2c30db45339c438">getWaterDensity</a>(),3,10)+spc+<a class="code" href="namespaceShipCAD.html#af977e4008c66d1a323d105f27622991b">DensityStr</a>(u));</div><div class="line"><a name="l00387"></a><span class="lineno">  387</span>&#160;    strings.push_back(<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(HydrostaticCalc::tr(<span class="stringliteral">&quot;Appendage coefficient&quot;</span>),21)+sep</div><div class="line"><a name="l00388"></a><span class="lineno">  388</span>&#160;                      +<a class="code" href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">MakeLength</a>(ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a13b2f490e08d61b09a59d2d5008dba47">getAppendageCoefficient</a>(),4,10));</div><div class="line"><a name="l00389"></a><span class="lineno">  389</span>&#160;}</div><div class="line"><a name="l00390"></a><span class="lineno">  390</span>&#160;</div><div class="line"><a name="l00391"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#aa4077ad7205ef509d3a54edb8e04b8b7">  391</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aa4077ad7205ef509d3a54edb8e04b8b7">HydrostaticCalc::addFooter</a>(QStringList&amp; strings, <a class="code" href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3">hydrostatics_mode_t</a> mode)</div><div class="line"><a name="l00392"></a><span class="lineno">  392</span>&#160;{</div><div class="line"><a name="l00393"></a><span class="lineno">  393</span>&#160;    <a class="code" href="classShipCAD_1_1ProjectSettings.html">ProjectSettings</a>&amp; ps = _owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>();</div><div class="line"><a name="l00394"></a><span class="lineno">  394</span>&#160;    strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;NOTE 1: Draft (and all other vertical heights) is measured above the lowest point of the hull!&quot;</span>)</div><div class="line"><a name="l00395"></a><span class="lineno">  395</span>&#160;                      +<span class="stringliteral">&quot; (Z= &quot;</span>+QString(<span class="stringliteral">&quot;%1&quot;</span>).arg(_data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acd93669bc08fa097974d41fbaf4dc81f">model_min</a>.z(),0,<span class="charliteral">&#39;f&#39;</span>,3)</div><div class="line"><a name="l00396"></a><span class="lineno">  396</span>&#160;                      +<span class="stringliteral">&quot;)&quot;</span>);</div><div class="line"><a name="l00397"></a><span class="lineno">  397</span>&#160;    <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#aef0458c7bfa6e484a155e78eca0d0202">getHydrostaticCoefficients</a>() == <a class="code" href="namespaceShipCAD.html#a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2">fcActualData</a>)</div><div class="line"><a name="l00398"></a><span class="lineno">  398</span>&#160;        strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;NOTE 2: All calculated coefficients based on actual dimensions of submerged body.&quot;</span>));</div><div class="line"><a name="l00399"></a><span class="lineno">  399</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00400"></a><span class="lineno">  400</span>&#160;        strings.push_back(HydrostaticCalc::tr(<span class="stringliteral">&quot;NOTE 2: All calculated coefficients based on project length), draft and beam.&quot;</span>));</div><div class="line"><a name="l00401"></a><span class="lineno">  401</span>&#160;    strings.push_back(<span class="stringliteral">&quot;&quot;</span>);</div><div class="line"><a name="l00402"></a><span class="lineno">  402</span>&#160;    <span class="keywordflow">if</span> (mode == <a class="code" href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3aee242838cf07c1950c914a44851804b5">fhMultipleCalculations</a>) {</div><div class="line"><a name="l00403"></a><span class="lineno">  403</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Lwl    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Length on waterline&quot;</span>));</div><div class="line"><a name="l00404"></a><span class="lineno">  404</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Bwl    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Beam on waterline&quot;</span>));</div><div class="line"><a name="l00405"></a><span class="lineno">  405</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Volume : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Displaced volume&quot;</span>));</div><div class="line"><a name="l00406"></a><span class="lineno">  406</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Displ. : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Displacement&quot;</span>));</div><div class="line"><a name="l00407"></a><span class="lineno">  407</span>&#160;        strings.push_back(<span class="stringliteral">&quot;LCB    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal center of buoyancy&quot;</span>)</div><div class="line"><a name="l00408"></a><span class="lineno">  408</span>&#160;                          +<span class="stringliteral">&quot;, &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;measured from the aft perpendicular at X=0.0&quot;</span>));</div><div class="line"><a name="l00409"></a><span class="lineno">  409</span>&#160;        strings.push_back(<span class="stringliteral">&quot;VCB    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Vertical center of buoyancy&quot;</span>)</div><div class="line"><a name="l00410"></a><span class="lineno">  410</span>&#160;                          +<span class="stringliteral">&quot;, &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;measured from the lowest point of the hull&quot;</span>));</div><div class="line"><a name="l00411"></a><span class="lineno">  411</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Cb     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Block coefficient&quot;</span>));</div><div class="line"><a name="l00412"></a><span class="lineno">  412</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Am     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship section area&quot;</span>));</div><div class="line"><a name="l00413"></a><span class="lineno">  413</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Cm     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Midship coefficient&quot;</span>));</div><div class="line"><a name="l00414"></a><span class="lineno">  414</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Aw     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane area&quot;</span>));</div><div class="line"><a name="l00415"></a><span class="lineno">  415</span>&#160;        strings.push_back(<span class="stringliteral">&quot;Cw     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane coefficient&quot;</span>));</div><div class="line"><a name="l00416"></a><span class="lineno">  416</span>&#160;        strings.push_back(<span class="stringliteral">&quot;LCF    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Waterplane center of floatation&quot;</span>));</div><div class="line"><a name="l00417"></a><span class="lineno">  417</span>&#160;        strings.push_back(<span class="stringliteral">&quot;CP     : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Prismatic coefficient&quot;</span>));</div><div class="line"><a name="l00418"></a><span class="lineno">  418</span>&#160;        strings.push_back(<span class="stringliteral">&quot;S      : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Wetted surface area&quot;</span>));</div><div class="line"><a name="l00419"></a><span class="lineno">  419</span>&#160;        strings.push_back(<span class="stringliteral">&quot;KMt    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Transverse metacentric height&quot;</span>));</div><div class="line"><a name="l00420"></a><span class="lineno">  420</span>&#160;        strings.push_back(<span class="stringliteral">&quot;KMl    : &quot;</span>+HydrostaticCalc::tr(<span class="stringliteral">&quot;Longitudinal metacentric height&quot;</span>));</div><div class="line"><a name="l00421"></a><span class="lineno">  421</span>&#160;    }</div><div class="line"><a name="l00422"></a><span class="lineno">  422</span>&#160;}</div><div class="line"><a name="l00423"></a><span class="lineno">  423</span>&#160;</div><div class="line"><a name="l00424"></a><span class="lineno">  424</span>&#160;<span class="comment">// used in balance</span></div><div class="line"><a name="l00425"></a><span class="lineno">  425</span>&#160;<span class="keyword">static</span> <span class="keywordtype">float</span> DisplInterpolate(<span class="keywordtype">float</span> x, <span class="keywordtype">float</span> x1, <span class="keywordtype">float</span> y1, <span class="keywordtype">float</span> x2, <span class="keywordtype">float</span> y2)</div><div class="line"><a name="l00426"></a><span class="lineno">  426</span>&#160;{</div><div class="line"><a name="l00427"></a><span class="lineno">  427</span>&#160;    <span class="keywordtype">float</span> result;</div><div class="line"><a name="l00428"></a><span class="lineno">  428</span>&#160;    </div><div class="line"><a name="l00429"></a><span class="lineno">  429</span>&#160;    <span class="keywordflow">if</span> (fabs(x2 - x1) &lt; 1e-3)</div><div class="line"><a name="l00430"></a><span class="lineno">  430</span>&#160;        result = 0.5 * (y1 + y2);</div><div class="line"><a name="l00431"></a><span class="lineno">  431</span>&#160;    <span class="keywordflow">else</span></div><div class="line"><a name="l00432"></a><span class="lineno">  432</span>&#160;        result = y1 + (y2 - y1) * (x - x1) / (x2 - x1);</div><div class="line"><a name="l00433"></a><span class="lineno">  433</span>&#160;    <span class="keywordflow">if</span> (result &lt; y1 || result &gt; y2)</div><div class="line"><a name="l00434"></a><span class="lineno">  434</span>&#160;        result = 0.5 * (y1 + y2);</div><div class="line"><a name="l00435"></a><span class="lineno">  435</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00436"></a><span class="lineno">  436</span>&#160;}</div><div class="line"><a name="l00437"></a><span class="lineno">  437</span>&#160;</div><div class="line"><a name="l00438"></a><span class="lineno">  438</span>&#160;<span class="comment">// used in balance</span></div><div class="line"><a name="l00439"></a><span class="lineno">  439</span>&#160;<span class="keyword">static</span> QVector3D RotatePointBack(<span class="keyword">const</span> QVector3D&amp; p, <span class="keywordtype">float</span> CosTrim, <span class="keywordtype">float</span> SinTrim,</div><div class="line"><a name="l00440"></a><span class="lineno">  440</span>&#160;                                 <span class="keywordtype">float</span> CosHeel, <span class="keywordtype">float</span> SinHeel)</div><div class="line"><a name="l00441"></a><span class="lineno">  441</span>&#160;{</div><div class="line"><a name="l00442"></a><span class="lineno">  442</span>&#160;    <span class="keywordflow">return</span> QVector3D(p.x() * CosTrim - p.z() * SinTrim,</div><div class="line"><a name="l00443"></a><span class="lineno">  443</span>&#160;                     p.y() * CosHeel + p.x() * SinTrim * SinHeel</div><div class="line"><a name="l00444"></a><span class="lineno">  444</span>&#160;                     + p.z() * CosTrim * SinHeel,</div><div class="line"><a name="l00445"></a><span class="lineno">  445</span>&#160;                     -p.y() * SinHeel + p.x() * SinTrim * CosHeel</div><div class="line"><a name="l00446"></a><span class="lineno">  446</span>&#160;                     + p.z() * CosTrim * CosHeel);</div><div class="line"><a name="l00447"></a><span class="lineno">  447</span>&#160;}</div><div class="line"><a name="l00448"></a><span class="lineno">  448</span>&#160;</div><div class="line"><a name="l00449"></a><span class="lineno"><a class="line" href="structMinMaxData.html">  449</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structMinMaxData.html">MinMaxData</a> </div><div class="line"><a name="l00450"></a><span class="lineno">  450</span>&#160;{</div><div class="line"><a name="l00451"></a><span class="lineno"><a class="line" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">  451</a></span>&#160;    QVector3D <a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a>;</div><div class="line"><a name="l00452"></a><span class="lineno"><a class="line" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">  452</a></span>&#160;    QVector3D <a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>;</div><div class="line"><a name="l00453"></a><span class="lineno"><a class="line" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">  453</a></span>&#160;    QVector3D <a class="code" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">plane_normal</a>;</div><div class="line"><a name="l00454"></a><span class="lineno"><a class="line" href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">  454</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">max_draft</a>;</div><div class="line"><a name="l00455"></a><span class="lineno"><a class="line" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">  455</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">lowest_z</a>;</div><div class="line"><a name="l00456"></a><span class="lineno"><a class="line" href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">  456</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">calculated</a>;</div><div class="line"><a name="l00457"></a><span class="lineno">  457</span>&#160;};</div><div class="line"><a name="l00458"></a><span class="lineno">  458</span>&#160;</div><div class="line"><a name="l00459"></a><span class="lineno">  459</span>&#160;<span class="comment">// used in balance</span></div><div class="line"><a name="l00460"></a><span class="lineno">  460</span>&#160;<span class="keyword">static</span> <a class="code" href="classShipCAD_1_1Plane.html">Plane</a> CalculateWaterlinePlane(<span class="keywordtype">float</span> desired_draft, <a class="code" href="structMinMaxData.html">MinMaxData</a>&amp; mmd)</div><div class="line"><a name="l00461"></a><span class="lineno">  461</span>&#160;{</div><div class="line"><a name="l00462"></a><span class="lineno">  462</span>&#160;    QVector3D p = mmd.<a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a> + desired_draft * mmd.<a class="code" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">plane_normal</a>;</div><div class="line"><a name="l00463"></a><span class="lineno">  463</span>&#160;    <span class="keywordflow">return</span> <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>(p, mmd.<a class="code" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">plane_normal</a>);</div><div class="line"><a name="l00464"></a><span class="lineno">  464</span>&#160;}</div><div class="line"><a name="l00465"></a><span class="lineno">  465</span>&#160;</div><div class="line"><a name="l00466"></a><span class="lineno">  466</span>&#160;<span class="comment">// used in balance</span></div><div class="line"><a name="l00467"></a><span class="lineno">  467</span>&#160;<span class="keyword">static</span> <span class="keywordtype">void</span> CalculateMinMaxData(<a class="code" href="structMinMaxData.html">MinMaxData</a>&amp; mmd, <a class="code" href="classShipCAD_1_1ShipCADModel.html">ShipCADModel</a>* owner,</div><div class="line"><a name="l00468"></a><span class="lineno">  468</span>&#160;                                <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>&amp; wlplane, <span class="keywordtype">float</span> CosTrim, <span class="keywordtype">float</span> SinTrim,</div><div class="line"><a name="l00469"></a><span class="lineno">  469</span>&#160;                                <span class="keywordtype">float</span> CosHeel, <span class="keywordtype">float</span> SinHeel)</div><div class="line"><a name="l00470"></a><span class="lineno">  470</span>&#160;{</div><div class="line"><a name="l00471"></a><span class="lineno">  471</span>&#160;    <span class="comment">// zero out min max data</span></div><div class="line"><a name="l00472"></a><span class="lineno">  472</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a> = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00473"></a><span class="lineno">  473</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a> = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00474"></a><span class="lineno">  474</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">plane_normal</a> = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00475"></a><span class="lineno">  475</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">max_draft</a> = mmd.<a class="code" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">lowest_z</a> = 0.0;</div><div class="line"><a name="l00476"></a><span class="lineno">  476</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">calculated</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00477"></a><span class="lineno">  477</span>&#160;    </div><div class="line"><a name="l00478"></a><span class="lineno">  478</span>&#160;    QVector3D p1 = RotatePointBack(<a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>, CosTrim, SinTrim, CosHeel, SinHeel);</div><div class="line"><a name="l00479"></a><span class="lineno">  479</span>&#160;    QVector3D p2 = RotatePointBack(QVector3D(1.0, 0.0, 0.0),</div><div class="line"><a name="l00480"></a><span class="lineno">  480</span>&#160;                                   CosTrim, SinTrim, CosHeel, SinHeel);</div><div class="line"><a name="l00481"></a><span class="lineno">  481</span>&#160;    QVector3D p3 = RotatePointBack(QVector3D(1.0, 1.0, 0.0),</div><div class="line"><a name="l00482"></a><span class="lineno">  482</span>&#160;                                   CosTrim, SinTrim, CosHeel, SinHeel);</div><div class="line"><a name="l00483"></a><span class="lineno">  483</span>&#160;    <span class="comment">// the following plane has the right orientation for the given trim</span></div><div class="line"><a name="l00484"></a><span class="lineno">  484</span>&#160;    <span class="comment">// and angle of heel, however the correct distance from the lowest point</span></div><div class="line"><a name="l00485"></a><span class="lineno">  485</span>&#160;    <span class="comment">// on the hull has to be calculated</span></div><div class="line"><a name="l00486"></a><span class="lineno">  486</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">plane_normal</a> = <a class="code" href="namespaceShipCAD.html#a81e47e31f89000550b007c0f9a4d09aa">UnifiedNormal</a>(p1, p2, p3);</div><div class="line"><a name="l00487"></a><span class="lineno">  487</span>&#160;    wlplane = <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>(p1, p2, p3);</div><div class="line"><a name="l00488"></a><span class="lineno">  488</span>&#160;    <span class="keywordtype">bool</span> first = <span class="keyword">true</span>;</div><div class="line"><a name="l00489"></a><span class="lineno">  489</span>&#160;    <span class="keywordtype">bool</span> firstleak = <span class="keyword">true</span>;</div><div class="line"><a name="l00490"></a><span class="lineno">  490</span>&#160;    <span class="keywordtype">float</span> min = 0;</div><div class="line"><a name="l00491"></a><span class="lineno">  491</span>&#160;    <span class="keywordtype">float</span> max = 0;</div><div class="line"><a name="l00492"></a><span class="lineno">  492</span>&#160;    <span class="keywordtype">float</span> distance;</div><div class="line"><a name="l00493"></a><span class="lineno">  493</span>&#160;    <a class="code" href="classShipCAD_1_1SubdivisionSurface.html">SubdivisionSurface</a>* surf = owner-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">getSurface</a>();</div><div class="line"><a name="l00494"></a><span class="lineno">  494</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a011480014cfb68430c9f60aff474936c">numberOfLayers</a>(); i++) {</div><div class="line"><a name="l00495"></a><span class="lineno">  495</span>&#160;        <span class="keywordflow">if</span> (surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a1d2811b35f699b4eda6a08b543863096">useInHydrostatics</a>()) {</div><div class="line"><a name="l00496"></a><span class="lineno">  496</span>&#160;            <a class="code" href="classShipCAD_1_1SubdivisionLayer.html">SubdivisionLayer</a>* layer = surf-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i);</div><div class="line"><a name="l00497"></a><span class="lineno">  497</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j=0; j&lt;layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#ad0d77de06b53814e248fc9bbfa908252">numberOfFaces</a>(); j++) {</div><div class="line"><a name="l00498"></a><span class="lineno">  498</span>&#160;                <a class="code" href="classShipCAD_1_1SubdivisionControlFace.html">SubdivisionControlFace</a>* face = layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a2e1538a000268fe5f56bf2bea4973c23">getFace</a>(j);</div><div class="line"><a name="l00499"></a><span class="lineno">  499</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k=0; k&lt;face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6a79fec036f3d7d52214a280e878a038">numberOfChildren</a>(); k++) {</div><div class="line"><a name="l00500"></a><span class="lineno">  500</span>&#160;                    <a class="code" href="classShipCAD_1_1SubdivisionFace.html">SubdivisionFace</a>* child = face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6f015666ee5e626ce3aed4973f8d12a7">getChild</a>(k);</div><div class="line"><a name="l00501"></a><span class="lineno">  501</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=0; l&lt;child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>(); l++) {</div><div class="line"><a name="l00502"></a><span class="lineno">  502</span>&#160;                        QVector3D p = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00503"></a><span class="lineno">  503</span>&#160;                        distance = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * p1.x() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * p1.y()</div><div class="line"><a name="l00504"></a><span class="lineno">  504</span>&#160;                            + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * p1.z() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00505"></a><span class="lineno">  505</span>&#160;                        <span class="keywordflow">if</span> (first) {</div><div class="line"><a name="l00506"></a><span class="lineno">  506</span>&#160;                            min = distance;</div><div class="line"><a name="l00507"></a><span class="lineno">  507</span>&#160;                            max = min;</div><div class="line"><a name="l00508"></a><span class="lineno">  508</span>&#160;                            mmd.<a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a> = p1;</div><div class="line"><a name="l00509"></a><span class="lineno">  509</span>&#160;                            mmd.<a class="code" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">lowest_z</a> = p1.z();</div><div class="line"><a name="l00510"></a><span class="lineno">  510</span>&#160;                        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00511"></a><span class="lineno">  511</span>&#160;                            <span class="keywordflow">if</span> (distance &lt; min) {</div><div class="line"><a name="l00512"></a><span class="lineno">  512</span>&#160;                                min = distance;</div><div class="line"><a name="l00513"></a><span class="lineno">  513</span>&#160;                                mmd.<a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a> = p1;</div><div class="line"><a name="l00514"></a><span class="lineno">  514</span>&#160;                            } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (distance &gt; max) {</div><div class="line"><a name="l00515"></a><span class="lineno">  515</span>&#160;                                max = distance;</div><div class="line"><a name="l00516"></a><span class="lineno">  516</span>&#160;                            }</div><div class="line"><a name="l00517"></a><span class="lineno">  517</span>&#160;                            <span class="keywordflow">if</span> (p1.z() &lt; mmd.<a class="code" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">lowest_z</a>)</div><div class="line"><a name="l00518"></a><span class="lineno">  518</span>&#160;                                mmd.<a class="code" href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">lowest_z</a> = p1.z();</div><div class="line"><a name="l00519"></a><span class="lineno">  519</span>&#160;                        }</div><div class="line"><a name="l00520"></a><span class="lineno">  520</span>&#160;                        p1.setY(-p1.y());</div><div class="line"><a name="l00521"></a><span class="lineno">  521</span>&#160;                        distance = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * p1.x() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * p1.y()</div><div class="line"><a name="l00522"></a><span class="lineno">  522</span>&#160;                            + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * p1.z() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00523"></a><span class="lineno">  523</span>&#160;                        <span class="keywordflow">if</span> (distance &lt; min) {</div><div class="line"><a name="l00524"></a><span class="lineno">  524</span>&#160;                            min = distance;</div><div class="line"><a name="l00525"></a><span class="lineno">  525</span>&#160;                            mmd.<a class="code" href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">lowest_point</a> = p1;</div><div class="line"><a name="l00526"></a><span class="lineno">  526</span>&#160;                        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (distance &gt; max)</div><div class="line"><a name="l00527"></a><span class="lineno">  527</span>&#160;                            max = distance;</div><div class="line"><a name="l00528"></a><span class="lineno">  528</span>&#160;                        <span class="comment">// check if this point is a leak point</span></div><div class="line"><a name="l00529"></a><span class="lineno">  529</span>&#160;                        <span class="keywordflow">if</span> (fabs(p.y()) &gt; 1e-4 &amp;&amp; child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a98f292173998daf2747cb0f5ba7038a4">isBoundaryVertex</a>()) {</div><div class="line"><a name="l00530"></a><span class="lineno">  530</span>&#160;                            p1 = p;</div><div class="line"><a name="l00531"></a><span class="lineno">  531</span>&#160;                            <span class="keywordflow">if</span> (firstleak) {</div><div class="line"><a name="l00532"></a><span class="lineno">  532</span>&#160;                                firstleak = <span class="keyword">false</span>;</div><div class="line"><a name="l00533"></a><span class="lineno">  533</span>&#160;                                mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a> = p1;</div><div class="line"><a name="l00534"></a><span class="lineno">  534</span>&#160;                            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00535"></a><span class="lineno">  535</span>&#160;                                distance = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * p1.x()</div><div class="line"><a name="l00536"></a><span class="lineno">  536</span>&#160;                                    + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * p1.y()</div><div class="line"><a name="l00537"></a><span class="lineno">  537</span>&#160;                                    + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * p1.z() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00538"></a><span class="lineno">  538</span>&#160;                                <span class="keywordtype">float</span> tmp = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.x()</div><div class="line"><a name="l00539"></a><span class="lineno">  539</span>&#160;                                    + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.y()</div><div class="line"><a name="l00540"></a><span class="lineno">  540</span>&#160;                                    + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.z()</div><div class="line"><a name="l00541"></a><span class="lineno">  541</span>&#160;                                    + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00542"></a><span class="lineno">  542</span>&#160;                                <span class="keywordflow">if</span> (distance &lt; tmp)</div><div class="line"><a name="l00543"></a><span class="lineno">  543</span>&#160;                                    mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a> = p1;</div><div class="line"><a name="l00544"></a><span class="lineno">  544</span>&#160;                            }</div><div class="line"><a name="l00545"></a><span class="lineno">  545</span>&#160;                            p1.setY(-p1.y());</div><div class="line"><a name="l00546"></a><span class="lineno">  546</span>&#160;                            distance = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * p1.x()</div><div class="line"><a name="l00547"></a><span class="lineno">  547</span>&#160;                                + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * p1.y()</div><div class="line"><a name="l00548"></a><span class="lineno">  548</span>&#160;                                + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * p1.z() + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00549"></a><span class="lineno">  549</span>&#160;                            <span class="keywordtype">float</span> tmp = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.x()</div><div class="line"><a name="l00550"></a><span class="lineno">  550</span>&#160;                                + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.y()</div><div class="line"><a name="l00551"></a><span class="lineno">  551</span>&#160;                                + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.z()</div><div class="line"><a name="l00552"></a><span class="lineno">  552</span>&#160;                                + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00553"></a><span class="lineno">  553</span>&#160;                            <span class="keywordflow">if</span> (distance &lt; tmp)</div><div class="line"><a name="l00554"></a><span class="lineno">  554</span>&#160;                                mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a> = p1;</div><div class="line"><a name="l00555"></a><span class="lineno">  555</span>&#160;                        }</div><div class="line"><a name="l00556"></a><span class="lineno">  556</span>&#160;                    }</div><div class="line"><a name="l00557"></a><span class="lineno">  557</span>&#160;                }</div><div class="line"><a name="l00558"></a><span class="lineno">  558</span>&#160;            }</div><div class="line"><a name="l00559"></a><span class="lineno">  559</span>&#160;        }</div><div class="line"><a name="l00560"></a><span class="lineno">  560</span>&#160;    }</div><div class="line"><a name="l00561"></a><span class="lineno">  561</span>&#160;    <span class="keywordflow">if</span> (!firstleak) {</div><div class="line"><a name="l00562"></a><span class="lineno">  562</span>&#160;        <span class="comment">// leak points have been found, check if this restricts the max draft</span></div><div class="line"><a name="l00563"></a><span class="lineno">  563</span>&#160;        distance = wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">a</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.x()</div><div class="line"><a name="l00564"></a><span class="lineno">  564</span>&#160;            + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">b</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.y()</div><div class="line"><a name="l00565"></a><span class="lineno">  565</span>&#160;            + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">c</a>() * mmd.<a class="code" href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">lowest_leak</a>.z()</div><div class="line"><a name="l00566"></a><span class="lineno">  566</span>&#160;            + wlplane.<a class="code" href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">d</a>();</div><div class="line"><a name="l00567"></a><span class="lineno">  567</span>&#160;        <span class="keywordflow">if</span> (distance &lt; max)</div><div class="line"><a name="l00568"></a><span class="lineno">  568</span>&#160;            max = distance;</div><div class="line"><a name="l00569"></a><span class="lineno">  569</span>&#160;        mmd.<a class="code" href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">max_draft</a> = max - min - 1e-4;</div><div class="line"><a name="l00570"></a><span class="lineno">  570</span>&#160;    }</div><div class="line"><a name="l00571"></a><span class="lineno">  571</span>&#160;}</div><div class="line"><a name="l00572"></a><span class="lineno">  572</span>&#160;</div><div class="line"><a name="l00573"></a><span class="lineno"><a class="line" href="structDraftData.html">  573</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structDraftData.html">DraftData</a></div><div class="line"><a name="l00574"></a><span class="lineno">  574</span>&#160;{</div><div class="line"><a name="l00575"></a><span class="lineno"><a class="line" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">  575</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a>;</div><div class="line"><a name="l00576"></a><span class="lineno"><a class="line" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">  576</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>;</div><div class="line"><a name="l00577"></a><span class="lineno">  577</span>&#160;};</div><div class="line"><a name="l00578"></a><span class="lineno">  578</span>&#160;</div><div class="line"><a name="l00579"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#a7573a510a6b53e56a79f4042e41ee89e">  579</a></span>&#160;<span class="keywordtype">bool</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a7573a510a6b53e56a79f4042e41ee89e">HydrostaticCalc::balance</a>(<span class="keywordtype">float</span> displacement, <span class="keywordtype">bool</span> freetotrim,</div><div class="line"><a name="l00580"></a><span class="lineno">  580</span>&#160;                              <a class="code" href="structShipCAD_1_1CrosscurvesData.html">CrosscurvesData</a>&amp; output)</div><div class="line"><a name="l00581"></a><span class="lineno">  581</span>&#160;{</div><div class="line"><a name="l00582"></a><span class="lineno">  582</span>&#160;    <span class="keywordflow">if</span> (displacement == 0)</div><div class="line"><a name="l00583"></a><span class="lineno">  583</span>&#160;        <span class="keywordflow">return</span> <span class="keyword">true</span>;</div><div class="line"><a name="l00584"></a><span class="lineno">  584</span>&#160;</div><div class="line"><a name="l00585"></a><span class="lineno">  585</span>&#160;    <span class="keywordflow">if</span> (!_owner-&gt;isBuild())</div><div class="line"><a name="l00586"></a><span class="lineno">  586</span>&#160;        _owner-&gt;rebuildModel(<span class="keyword">true</span>);</div><div class="line"><a name="l00587"></a><span class="lineno">  587</span>&#160;</div><div class="line"><a name="l00588"></a><span class="lineno">  588</span>&#160;    <span class="keywordtype">bool</span> result = <span class="keyword">false</span>;</div><div class="line"><a name="l00589"></a><span class="lineno">  589</span>&#160;    <span class="keywordtype">int</span> max_iterations = 25;</div><div class="line"><a name="l00590"></a><span class="lineno">  590</span>&#160;    <span class="keywordtype">float</span> max_error = 5e-4f;</div><div class="line"><a name="l00591"></a><span class="lineno">  591</span>&#160;    <span class="keywordtype">float</span> max_trim_error = 1e-4f;</div><div class="line"><a name="l00592"></a><span class="lineno">  592</span>&#160;    <span class="keywordtype">int</span> trim_iteration = 0;</div><div class="line"><a name="l00593"></a><span class="lineno">  593</span>&#160;    <span class="keywordtype">int</span> displ_iteration;</div><div class="line"><a name="l00594"></a><span class="lineno">  594</span>&#160;    <span class="keywordtype">float</span> cos_heel;</div><div class="line"><a name="l00595"></a><span class="lineno">  595</span>&#160;    <span class="keywordtype">float</span> sin_heel;</div><div class="line"><a name="l00596"></a><span class="lineno">  596</span>&#160;    <span class="keywordtype">float</span> cos_trim;</div><div class="line"><a name="l00597"></a><span class="lineno">  597</span>&#160;    <span class="keywordtype">float</span> sin_trim;</div><div class="line"><a name="l00598"></a><span class="lineno">  598</span>&#160;    <span class="keywordtype">float</span> error = 0;</div><div class="line"><a name="l00599"></a><span class="lineno">  599</span>&#160;    <span class="keywordtype">float</span> trim_error = 0;</div><div class="line"><a name="l00600"></a><span class="lineno">  600</span>&#160;    <span class="keywordtype">float</span> error_difference = 0;</div><div class="line"><a name="l00601"></a><span class="lineno">  601</span>&#160;    <span class="keywordtype">float</span> prev_error;</div><div class="line"><a name="l00602"></a><span class="lineno">  602</span>&#160;    <a class="code" href="classShipCAD_1_1Plane.html">Plane</a> wlplane;</div><div class="line"><a name="l00603"></a><span class="lineno">  603</span>&#160;    <a class="code" href="structMinMaxData.html">MinMaxData</a> mmd;</div><div class="line"><a name="l00604"></a><span class="lineno">  604</span>&#160;    <a class="code" href="structDraftData.html">DraftData</a> min_draft;</div><div class="line"><a name="l00605"></a><span class="lineno">  605</span>&#160;    <a class="code" href="structDraftData.html">DraftData</a> max_draft;</div><div class="line"><a name="l00606"></a><span class="lineno">  606</span>&#160;    <a class="code" href="structDraftData.html">DraftData</a> curr_draft;</div><div class="line"><a name="l00607"></a><span class="lineno">  607</span>&#160;    _data.clear();</div><div class="line"><a name="l00608"></a><span class="lineno">  608</span>&#160;    mmd.<a class="code" href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">calculated</a> = <span class="keyword">false</span>;</div><div class="line"><a name="l00609"></a><span class="lineno">  609</span>&#160;    output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a2fcb82c940ad6a13c07a25f44bbd5efd">clear</a>();</div><div class="line"><a name="l00610"></a><span class="lineno">  610</span>&#160;</div><div class="line"><a name="l00611"></a><span class="lineno">  611</span>&#160;    <span class="keywordflow">do</span> {</div><div class="line"><a name="l00612"></a><span class="lineno">  612</span>&#160;        trim_iteration++;</div><div class="line"><a name="l00613"></a><span class="lineno">  613</span>&#160;        cos_heel = cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-_heeling_angle));</div><div class="line"><a name="l00614"></a><span class="lineno">  614</span>&#160;        sin_heel = sin(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-_heeling_angle));</div><div class="line"><a name="l00615"></a><span class="lineno">  615</span>&#160;        cos_trim = cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">getTrimAngle</a>()));</div><div class="line"><a name="l00616"></a><span class="lineno">  616</span>&#160;        sin_trim = sin(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">getTrimAngle</a>()));</div><div class="line"><a name="l00617"></a><span class="lineno">  617</span>&#160;        <span class="keywordflow">if</span> (!mmd.<a class="code" href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">calculated</a>)</div><div class="line"><a name="l00618"></a><span class="lineno">  618</span>&#160;            CalculateMinMaxData(mmd, _owner, wlplane, cos_trim, sin_trim,</div><div class="line"><a name="l00619"></a><span class="lineno">  619</span>&#160;                                cos_heel, sin_heel);</div><div class="line"><a name="l00620"></a><span class="lineno">  620</span>&#160;        min_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a> = 0;</div><div class="line"><a name="l00621"></a><span class="lineno">  621</span>&#160;        min_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a> = 0;</div><div class="line"><a name="l00622"></a><span class="lineno">  622</span>&#160;        max_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a> = mmd.<a class="code" href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">max_draft</a>;</div><div class="line"><a name="l00623"></a><span class="lineno">  623</span>&#160;        wlplane = CalculateWaterlinePlane(max_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a>, mmd);</div><div class="line"><a name="l00624"></a><span class="lineno">  624</span>&#160;        <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad37fd32bf358c96b6653c6c92fd92c20">calculateVolume</a>(wlplane);</div><div class="line"><a name="l00625"></a><span class="lineno">  625</span>&#160;        max_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a> = _data.displacement;</div><div class="line"><a name="l00626"></a><span class="lineno">  626</span>&#160;        <span class="keywordflow">if</span> (displacement &gt; 1.005 * max_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>)</div><div class="line"><a name="l00627"></a><span class="lineno">  627</span>&#160;            <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad6415cb7c8e13ded4537292dd3a06688">addError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0aabbfd93b3daf55e537540d8d4ac8eb0c">feNotEnoughBuoyancy</a>);</div><div class="line"><a name="l00628"></a><span class="lineno">  628</span>&#160;        <span class="keywordflow">else</span> {</div><div class="line"><a name="l00629"></a><span class="lineno">  629</span>&#160;            displ_iteration = 0;</div><div class="line"><a name="l00630"></a><span class="lineno">  630</span>&#160;            prev_error = 0;</div><div class="line"><a name="l00631"></a><span class="lineno">  631</span>&#160;            <span class="keywordflow">do</span> {</div><div class="line"><a name="l00632"></a><span class="lineno">  632</span>&#160;                displ_iteration++;</div><div class="line"><a name="l00633"></a><span class="lineno">  633</span>&#160;                curr_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a> = DisplInterpolate(displacement,</div><div class="line"><a name="l00634"></a><span class="lineno">  634</span>&#160;                                                    min_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>,</div><div class="line"><a name="l00635"></a><span class="lineno">  635</span>&#160;                                                    min_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a>,</div><div class="line"><a name="l00636"></a><span class="lineno">  636</span>&#160;                                                    max_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>,</div><div class="line"><a name="l00637"></a><span class="lineno">  637</span>&#160;                                                    max_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a>);</div><div class="line"><a name="l00638"></a><span class="lineno">  638</span>&#160;                wlplane = CalculateWaterlinePlane(curr_draft.<a class="code" href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">draft</a>, mmd);</div><div class="line"><a name="l00639"></a><span class="lineno">  639</span>&#160;                <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad37fd32bf358c96b6653c6c92fd92c20">calculateVolume</a>(wlplane);</div><div class="line"><a name="l00640"></a><span class="lineno">  640</span>&#160;                curr_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a> = _data.displacement;</div><div class="line"><a name="l00641"></a><span class="lineno">  641</span>&#160;                <span class="keywordflow">if</span> (displacement &lt; 0.1)</div><div class="line"><a name="l00642"></a><span class="lineno">  642</span>&#160;                    error = fabs(displacement - curr_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>);</div><div class="line"><a name="l00643"></a><span class="lineno">  643</span>&#160;                <span class="keywordflow">else</span></div><div class="line"><a name="l00644"></a><span class="lineno">  644</span>&#160;                    error = fabs((displacement - curr_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a>) / displacement);</div><div class="line"><a name="l00645"></a><span class="lineno">  645</span>&#160;                <span class="keywordflow">if</span> (error &gt; max_error) {</div><div class="line"><a name="l00646"></a><span class="lineno">  646</span>&#160;                    <span class="keywordflow">if</span> (curr_draft.<a class="code" href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">displ</a> &lt; displacement)</div><div class="line"><a name="l00647"></a><span class="lineno">  647</span>&#160;                        min_draft = curr_draft;</div><div class="line"><a name="l00648"></a><span class="lineno">  648</span>&#160;                    <span class="keywordflow">else</span></div><div class="line"><a name="l00649"></a><span class="lineno">  649</span>&#160;                        max_draft = curr_draft;</div><div class="line"><a name="l00650"></a><span class="lineno">  650</span>&#160;                }</div><div class="line"><a name="l00651"></a><span class="lineno">  651</span>&#160;                error_difference = fabs(error - prev_error);</div><div class="line"><a name="l00652"></a><span class="lineno">  652</span>&#160;                prev_error = error;</div><div class="line"><a name="l00653"></a><span class="lineno">  653</span>&#160;            } <span class="keywordflow">while</span> ((error &gt;= max_error)</div><div class="line"><a name="l00654"></a><span class="lineno">  654</span>&#160;                     &amp;&amp; (displ_iteration &lt;= max_iterations)</div><div class="line"><a name="l00655"></a><span class="lineno">  655</span>&#160;                     &amp;&amp; (error_difference &gt;= 1e-5));</div><div class="line"><a name="l00656"></a><span class="lineno">  656</span>&#160;        }</div><div class="line"><a name="l00657"></a><span class="lineno">  657</span>&#160;        <span class="keywordflow">if</span> (freetotrim) {</div><div class="line"><a name="l00658"></a><span class="lineno">  658</span>&#160;            <span class="comment">// TODO</span></div><div class="line"><a name="l00659"></a><span class="lineno">  659</span>&#160;        } <span class="keywordflow">else</span></div><div class="line"><a name="l00660"></a><span class="lineno">  660</span>&#160;            trim_error = 0;</div><div class="line"><a name="l00661"></a><span class="lineno">  661</span>&#160;    } <span class="keywordflow">while</span> ((trim_iteration &lt;= max_iterations)</div><div class="line"><a name="l00662"></a><span class="lineno">  662</span>&#160;             &amp;&amp; (trim_error &lt;= max_trim_error));</div><div class="line"><a name="l00663"></a><span class="lineno">  663</span>&#160;    result = (trim_iteration &gt; max_iterations) &amp;&amp; (error &lt;= max_error)</div><div class="line"><a name="l00664"></a><span class="lineno">  664</span>&#160;        &amp;&amp; (error_difference &lt; 1e-5);</div><div class="line"><a name="l00665"></a><span class="lineno">  665</span>&#160;    <span class="keywordflow">if</span> (result) {</div><div class="line"><a name="l00666"></a><span class="lineno">  666</span>&#160;        output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a1ea6de1b52289e8392e8d499ae4aad04">waterline_plane</a> = _data.waterline_plane;</div><div class="line"><a name="l00667"></a><span class="lineno">  667</span>&#160;        output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a759e5729cdb86d8367b139e66fecb7d3">absolute_draft</a> = _data.absolute_draft;</div><div class="line"><a name="l00668"></a><span class="lineno">  668</span>&#160;        output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a9bec38a77bf87ab5feb76899e39e4f7b">volume</a> = _data.volume;</div><div class="line"><a name="l00669"></a><span class="lineno">  669</span>&#160;        output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a9a7baa66159e203888390eaa63caf708">displacement</a> = _data.displacement;</div><div class="line"><a name="l00670"></a><span class="lineno">  670</span>&#160;        output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a0de723cd5ae0e18953fb7ad5a0f5dadf">center_of_buoyancy</a> = _data.center_of_buoyancy;</div><div class="line"><a name="l00671"></a><span class="lineno">  671</span>&#160;        <span class="keywordflow">if</span> (fabs(_heeling_angle) &lt; 1e-5)</div><div class="line"><a name="l00672"></a><span class="lineno">  672</span>&#160;            output.<a class="code" href="structShipCAD_1_1CrosscurvesData.html#a0de723cd5ae0e18953fb7ad5a0f5dadf">center_of_buoyancy</a>.setY(0.0);</div><div class="line"><a name="l00673"></a><span class="lineno">  673</span>&#160;    }</div><div class="line"><a name="l00674"></a><span class="lineno">  674</span>&#160;    <span class="keywordflow">return</span> result;</div><div class="line"><a name="l00675"></a><span class="lineno">  675</span>&#160;}</div><div class="line"><a name="l00676"></a><span class="lineno">  676</span>&#160;</div><div class="line"><a name="l00679"></a><span class="lineno"><a class="line" href="structVolumeCalc.html">  679</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structVolumeCalc.html">VolumeCalc</a></div><div class="line"><a name="l00680"></a><span class="lineno">  680</span>&#160;{</div><div class="line"><a name="l00681"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#aed779c2eace630d0d41239df4d371407">  681</a></span>&#160;    QVector3D <a class="code" href="structVolumeCalc.html#aed779c2eace630d0d41239df4d371407">new_origin</a>;</div><div class="line"><a name="l00682"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a07e433d13508d3342e7f6a50604c40d3">  682</a></span>&#160;    QVector3D <a class="code" href="structVolumeCalc.html#a07e433d13508d3342e7f6a50604c40d3">keel</a>;</div><div class="line"><a name="l00683"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a6de823cbd9bb3aaedcb398a43b3187a5">  683</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structVolumeCalc.html#a6de823cbd9bb3aaedcb398a43b3187a5">CosTrim</a>;</div><div class="line"><a name="l00684"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a36511f2f033b5488a4f677586f3e8f97">  684</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structVolumeCalc.html#a36511f2f033b5488a4f677586f3e8f97">SinTrim</a>;</div><div class="line"><a name="l00685"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a5f92422c5175c94b265581fd19f1da24">  685</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structVolumeCalc.html#a5f92422c5175c94b265581fd19f1da24">CosHeel</a>;</div><div class="line"><a name="l00686"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#ac1612ccb79673d6800b89a1acf46a028">  686</a></span>&#160;    <span class="keywordtype">float</span> <a class="code" href="structVolumeCalc.html#ac1612ccb79673d6800b89a1acf46a028">SinHeel</a>;</div><div class="line"><a name="l00687"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a3bc27914e09f86d93cb28daad90dddc1">  687</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structVolumeCalc.html#a3bc27914e09f86d93cb28daad90dddc1">first_submerged_point</a>;</div><div class="line"><a name="l00688"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#ab639da79639aeb33b3aaeb429283f8ca">  688</a></span>&#160;    <span class="keywordtype">bool</span> <a class="code" href="structVolumeCalc.html#ab639da79639aeb33b3aaeb429283f8ca">first_point</a>;</div><div class="line"><a name="l00689"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a5b3b6d4983faa3c309ddc85981945993">  689</a></span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html">HydrostaticCalc</a>* <a class="code" href="structVolumeCalc.html#a5b3b6d4983faa3c309ddc85981945993">hydro_calc</a>;</div><div class="line"><a name="l00690"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#acb7ab639ec6e5c77daf116c6eb58693a">  690</a></span>&#160;    <a class="code" href="structShipCAD_1_1HydrostaticsData.html">HydrostaticsData</a>&amp; <a class="code" href="structVolumeCalc.html#acb7ab639ec6e5c77daf116c6eb58693a">data</a>;</div><div class="line"><a name="l00691"></a><span class="lineno">  691</span>&#160;</div><div class="line"><a name="l00692"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a21a672444dafcae8293fe2b8be4dc071">  692</a></span>&#160;    <a class="code" href="structVolumeCalc.html#a21a672444dafcae8293fe2b8be4dc071">VolumeCalc</a>(<span class="keyword">const</span> <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>&amp; wl, <a class="code" href="classShipCAD_1_1HydrostaticCalc.html">HydrostaticCalc</a>* hc)</div><div class="line"><a name="l00693"></a><span class="lineno">  693</span>&#160;        : first_submerged_point(true), first_point(true),</div><div class="line"><a name="l00694"></a><span class="lineno">  694</span>&#160;          hydro_calc(hc), data(hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aabcae04d59358b87b9d5fb4ffda83f1a">getData</a>())</div><div class="line"><a name="l00695"></a><span class="lineno">  695</span>&#160;        {</div><div class="line"><a name="l00696"></a><span class="lineno">  696</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a> = wl;</div><div class="line"><a name="l00697"></a><span class="lineno">  697</span>&#160;            CosHeel = cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a7b27fef68486f663fd325ef316032a03">getHeelingAngle</a>()));</div><div class="line"><a name="l00698"></a><span class="lineno">  698</span>&#160;            SinHeel = sin(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a7b27fef68486f663fd325ef316032a03">getHeelingAngle</a>()));</div><div class="line"><a name="l00699"></a><span class="lineno">  699</span>&#160;            CosTrim = cos(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">getTrimAngle</a>()));</div><div class="line"><a name="l00700"></a><span class="lineno">  700</span>&#160;            SinTrim = sin(<a class="code" href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">DegToRad</a>(-hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">getTrimAngle</a>()));</div><div class="line"><a name="l00701"></a><span class="lineno">  701</span>&#160;            keel = QVector3D(0, 0, hc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ac1dc0e446e711461bb3747326efd8df6">getOwner</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#ab16487a794947608cace81a06552b2b1">findLowestHydrostaticsPoint</a>());</div><div class="line"><a name="l00702"></a><span class="lineno">  702</span>&#160;            <span class="comment">// in order to calculate the volume enclosed by the underwatership correctly</span></div><div class="line"><a name="l00703"></a><span class="lineno">  703</span>&#160;            <span class="comment">// the origin(0,0,0) is projected onto the waterline plane</span></div><div class="line"><a name="l00704"></a><span class="lineno">  704</span>&#160;            new_origin = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>.<a class="code" href="classShipCAD_1_1Plane.html#a2ef81e9310257ad80b087181f3191b4a">projectPointOnPlane</a>(<a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>);</div><div class="line"><a name="l00705"></a><span class="lineno">  705</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a> = 1000;</div><div class="line"><a name="l00706"></a><span class="lineno">  706</span>&#160;        }</div><div class="line"><a name="l00707"></a><span class="lineno">  707</span>&#160;    </div><div class="line"><a name="l00708"></a><span class="lineno">  708</span>&#160;    <span class="comment">// rotate a point at heel=0 and trim=0 position to given trim and heel</span></div><div class="line"><a name="l00709"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#ac075a2bc2a2a39a3e89c8b3184bea996">  709</a></span>&#160;    QVector3D <a class="code" href="structVolumeCalc.html#ac075a2bc2a2a39a3e89c8b3184bea996">RotatePoint</a>(QVector3D p)</div><div class="line"><a name="l00710"></a><span class="lineno">  710</span>&#160;    {</div><div class="line"><a name="l00711"></a><span class="lineno">  711</span>&#160;        p.setZ(p.z() - keel.z());</div><div class="line"><a name="l00712"></a><span class="lineno">  712</span>&#160;        <span class="keywordflow">return</span> QVector3D(p.x() * CosTrim + p.y() * SinHeel * SinTrim + p.z() * CosHeel * SinTrim,</div><div class="line"><a name="l00713"></a><span class="lineno">  713</span>&#160;                         p.y() * CosHeel - p.z() * SinHeel,</div><div class="line"><a name="l00714"></a><span class="lineno">  714</span>&#160;                         -p.x() * SinTrim + p.y() * SinHeel * CosTrim + p.z() * CosHeel * CosTrim);</div><div class="line"><a name="l00715"></a><span class="lineno">  715</span>&#160;    }</div><div class="line"><a name="l00716"></a><span class="lineno">  716</span>&#160;</div><div class="line"><a name="l00717"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a76b82a9e1e96365185536a8fc799e235">  717</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="structVolumeCalc.html#a76b82a9e1e96365185536a8fc799e235">CheckSubmergedBody</a>(QVector3D p, <span class="keywordtype">float</span> side)</div><div class="line"><a name="l00718"></a><span class="lineno">  718</span>&#160;    {</div><div class="line"><a name="l00719"></a><span class="lineno">  719</span>&#160;        p = RotatePoint(p);</div><div class="line"><a name="l00720"></a><span class="lineno">  720</span>&#160;        <span class="keywordflow">if</span> (first_submerged_point) {</div><div class="line"><a name="l00721"></a><span class="lineno">  721</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2d0a1e5f6bf98f8eceb958e5f7e7c73e">sub_min</a> = p;</div><div class="line"><a name="l00722"></a><span class="lineno">  722</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab3a6e316a991426c74673025439f123c">sub_max</a> = p;</div><div class="line"><a name="l00723"></a><span class="lineno">  723</span>&#160;            first_submerged_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00724"></a><span class="lineno">  724</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00725"></a><span class="lineno">  725</span>&#160;            <a class="code" href="namespaceShipCAD.html#aa5d3fc63603d716d3e24244049e1e510">MinMax</a>(p, data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a2d0a1e5f6bf98f8eceb958e5f7e7c73e">sub_min</a>, data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab3a6e316a991426c74673025439f123c">sub_max</a>);</div><div class="line"><a name="l00726"></a><span class="lineno">  726</span>&#160;        }</div><div class="line"><a name="l00727"></a><span class="lineno">  727</span>&#160;        <span class="keywordflow">if</span> (side &gt; -1e-5 &amp;&amp; side &lt; 1e-5) {</div><div class="line"><a name="l00728"></a><span class="lineno">  728</span>&#160;            <span class="comment">// point is exactly on waterplane</span></div><div class="line"><a name="l00729"></a><span class="lineno">  729</span>&#160;            <span class="keywordflow">if</span> (first_point) {</div><div class="line"><a name="l00730"></a><span class="lineno">  730</span>&#160;                <span class="comment">// calculate waterline properties</span></div><div class="line"><a name="l00731"></a><span class="lineno">  731</span>&#160;                data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a3bb2750b6306d9e8ae09bb4eebb1ed0c">wl_min</a> = p;</div><div class="line"><a name="l00732"></a><span class="lineno">  732</span>&#160;                data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a332be807e8373521c238d82b9dcedc38">wl_max</a> = p;</div><div class="line"><a name="l00733"></a><span class="lineno">  733</span>&#160;                first_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00734"></a><span class="lineno">  734</span>&#160;            } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00735"></a><span class="lineno">  735</span>&#160;                <a class="code" href="namespaceShipCAD.html#aa5d3fc63603d716d3e24244049e1e510">MinMax</a>(p, data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a3bb2750b6306d9e8ae09bb4eebb1ed0c">wl_min</a>, data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a332be807e8373521c238d82b9dcedc38">wl_max</a>);</div><div class="line"><a name="l00736"></a><span class="lineno">  736</span>&#160;            }</div><div class="line"><a name="l00737"></a><span class="lineno">  737</span>&#160;        }</div><div class="line"><a name="l00738"></a><span class="lineno">  738</span>&#160;    }</div><div class="line"><a name="l00739"></a><span class="lineno">  739</span>&#160;</div><div class="line"><a name="l00740"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#ae4d9b88d4538df112bdf297a3c6364b8">  740</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="structVolumeCalc.html#ae4d9b88d4538df112bdf297a3c6364b8">ProcessTriangle</a>(QVector3D p1, QVector3D p2, QVector3D p3)</div><div class="line"><a name="l00741"></a><span class="lineno">  741</span>&#160;    {</div><div class="line"><a name="l00742"></a><span class="lineno">  742</span>&#160;        QVector3D volume_moment;</div><div class="line"><a name="l00743"></a><span class="lineno">  743</span>&#160;        <span class="comment">// reposition points with respect to the new projected origin</span></div><div class="line"><a name="l00744"></a><span class="lineno">  744</span>&#160;        p1 -= new_origin;</div><div class="line"><a name="l00745"></a><span class="lineno">  745</span>&#160;        p2 -= new_origin;</div><div class="line"><a name="l00746"></a><span class="lineno">  746</span>&#160;        p3 -= new_origin;</div><div class="line"><a name="l00747"></a><span class="lineno">  747</span>&#160;        QVector3D center = (p1 + p2 + p3) / 3.0f;</div><div class="line"><a name="l00748"></a><span class="lineno">  748</span>&#160;        <span class="keywordtype">float</span> volume = QVector3D::dotProduct(p1, QVector3D::crossProduct(p2, p3)) / 6.0f;</div><div class="line"><a name="l00749"></a><span class="lineno">  749</span>&#160;        <span class="keywordflow">if</span> (volume != 0) {</div><div class="line"><a name="l00750"></a><span class="lineno">  750</span>&#160;            volume_moment = .75 * volume * center;</div><div class="line"><a name="l00751"></a><span class="lineno">  751</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a> += volume;</div><div class="line"><a name="l00752"></a><span class="lineno">  752</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a> += volume_moment;</div><div class="line"><a name="l00753"></a><span class="lineno">  753</span>&#160;        }</div><div class="line"><a name="l00754"></a><span class="lineno">  754</span>&#160;        <span class="keywordtype">float</span> ax = 0.5 * ((p1.y() - p2.y()) * (p1.z() + p2.z()) + (p2.y() - p3.y()) * (p2.z() + p3.z())</div><div class="line"><a name="l00755"></a><span class="lineno">  755</span>&#160;                          + (p3.y() - p1.y()) * (p3.z() + p1.z()));</div><div class="line"><a name="l00756"></a><span class="lineno">  756</span>&#160;        <span class="keywordtype">float</span> ay = 0.5 * ((p1.z() - p2.z()) * (p1.x() + p2.x()) + (p2.z() - p3.z()) * (p2.x() + p3.x())</div><div class="line"><a name="l00757"></a><span class="lineno">  757</span>&#160;                          + (p3.z() - p1.z()) * (p3.x() + p1.x()));</div><div class="line"><a name="l00758"></a><span class="lineno">  758</span>&#160;        <span class="keywordtype">float</span> az = 0.5 * ((p1.x() - p2.x()) * (p1.y() + p2.y()) + (p2.x() - p3.x()) * (p2.y() + p3.y())</div><div class="line"><a name="l00759"></a><span class="lineno">  759</span>&#160;                          + (p3.x() - p1.x()) * (p3.y() + p1.y()));</div><div class="line"><a name="l00760"></a><span class="lineno">  760</span>&#160;        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ad4b78176732ea80000adb94b5b5669f3">wetted_surface</a> += sqrt(ax * ax + ay * ay + az * az);</div><div class="line"><a name="l00761"></a><span class="lineno">  761</span>&#160;    }</div><div class="line"><a name="l00762"></a><span class="lineno">  762</span>&#160;</div><div class="line"><a name="l00763"></a><span class="lineno"><a class="line" href="structVolumeCalc.html#a9dc91b671e810b1bd4236565a89caf05">  763</a></span>&#160;    <span class="keywordtype">void</span> <a class="code" href="structVolumeCalc.html#a9dc91b671e810b1bd4236565a89caf05">run</a>() {</div><div class="line"><a name="l00764"></a><span class="lineno">  764</span>&#160;        QVector3D p, p1, p2, p3;</div><div class="line"><a name="l00765"></a><span class="lineno">  765</span>&#160;        <span class="keywordtype">bool</span> submerged = <span class="keyword">false</span>;</div><div class="line"><a name="l00766"></a><span class="lineno">  766</span>&#160;        <span class="keywordtype">float</span> side1, side2, parameter;</div><div class="line"><a name="l00767"></a><span class="lineno">  767</span>&#160;        vector&lt;QVector3D&gt; points;</div><div class="line"><a name="l00768"></a><span class="lineno">  768</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ac1dc0e446e711461bb3747326efd8df6">getOwner</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">getSurface</a>()-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a011480014cfb68430c9f60aff474936c">numberOfLayers</a>(); i++) {</div><div class="line"><a name="l00769"></a><span class="lineno">  769</span>&#160;            <a class="code" href="classShipCAD_1_1SubdivisionLayer.html">SubdivisionLayer</a>* layer = hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ac1dc0e446e711461bb3747326efd8df6">getOwner</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">getSurface</a>()-&gt;<a class="code" href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">getLayer</a>(i);</div><div class="line"><a name="l00770"></a><span class="lineno">  770</span>&#160;            <span class="keywordflow">if</span> (!layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a1d2811b35f699b4eda6a08b543863096">useInHydrostatics</a>()) <span class="keywordflow">continue</span>;</div><div class="line"><a name="l00771"></a><span class="lineno">  771</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j=0; j&lt;layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#ad0d77de06b53814e248fc9bbfa908252">numberOfFaces</a>(); j++) {</div><div class="line"><a name="l00772"></a><span class="lineno">  772</span>&#160;                <a class="code" href="classShipCAD_1_1SubdivisionControlFace.html">SubdivisionControlFace</a>* face = layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a2e1538a000268fe5f56bf2bea4973c23">getFace</a>(j);</div><div class="line"><a name="l00773"></a><span class="lineno">  773</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k=0; k&lt;face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6a79fec036f3d7d52214a280e878a038">numberOfChildren</a>(); k++) {</div><div class="line"><a name="l00774"></a><span class="lineno">  774</span>&#160;                    <a class="code" href="classShipCAD_1_1SubdivisionFace.html">SubdivisionFace</a>* child = face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6f015666ee5e626ce3aed4973f8d12a7">getChild</a>(k);</div><div class="line"><a name="l00775"></a><span class="lineno">  775</span>&#160;                    <span class="comment">// calculate the portside of the model</span></div><div class="line"><a name="l00776"></a><span class="lineno">  776</span>&#160;                    points.clear();</div><div class="line"><a name="l00777"></a><span class="lineno">  777</span>&#160;                    p1 = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>()-1)-&gt;getCoordinate();</div><div class="line"><a name="l00778"></a><span class="lineno">  778</span>&#160;                    <span class="comment">// calculate on which side of the waterplane this point is</span></div><div class="line"><a name="l00779"></a><span class="lineno">  779</span>&#160;                    side1 = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>.<a class="code" href="classShipCAD_1_1Plane.html#a6851b997a300848fcb37b33407165c44">distance</a>(p1);</div><div class="line"><a name="l00780"></a><span class="lineno">  780</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=0; l&lt;child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>(); l++) {</div><div class="line"><a name="l00781"></a><span class="lineno">  781</span>&#160;                        p2 = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00782"></a><span class="lineno">  782</span>&#160;                        side2 = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>.<a class="code" href="classShipCAD_1_1Plane.html#a6851b997a300848fcb37b33407165c44">distance</a>(p2);</div><div class="line"><a name="l00783"></a><span class="lineno">  783</span>&#160;                        <span class="keywordflow">if</span> ((side1 &lt; -1e-5 &amp;&amp; side2 &gt; 1e-5) || (side1 &gt; 1e-5 &amp;&amp; side2 &lt; -1e-5)) {</div><div class="line"><a name="l00784"></a><span class="lineno">  784</span>&#160;                            <span class="comment">// the current linesegment between p1-p2 intersects the waterline plane</span></div><div class="line"><a name="l00785"></a><span class="lineno">  785</span>&#160;                            <span class="keywordflow">if</span> (side1 == side2)</div><div class="line"><a name="l00786"></a><span class="lineno">  786</span>&#160;                                parameter = .5 * (side1 + side2);</div><div class="line"><a name="l00787"></a><span class="lineno">  787</span>&#160;                            <span class="keywordflow">else</span></div><div class="line"><a name="l00788"></a><span class="lineno">  788</span>&#160;                                parameter = -side1 / (side2 - side1);</div><div class="line"><a name="l00789"></a><span class="lineno">  789</span>&#160;                            p = p1 + parameter * (p2 - p1);</div><div class="line"><a name="l00790"></a><span class="lineno">  790</span>&#160;                            CheckSubmergedBody(p, 0);</div><div class="line"><a name="l00791"></a><span class="lineno">  791</span>&#160;                            points.push_back(p);</div><div class="line"><a name="l00792"></a><span class="lineno">  792</span>&#160;                        }</div><div class="line"><a name="l00793"></a><span class="lineno">  793</span>&#160;                        <span class="keywordflow">if</span> (side2 &lt;= 1e-5) {</div><div class="line"><a name="l00794"></a><span class="lineno">  794</span>&#160;                            <span class="keywordflow">if</span> (side2 &lt; data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a>)</div><div class="line"><a name="l00795"></a><span class="lineno">  795</span>&#160;                                data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a> = side2;</div><div class="line"><a name="l00796"></a><span class="lineno">  796</span>&#160;                            <span class="comment">// p2 lies also on or under the waterlineplane</span></div><div class="line"><a name="l00797"></a><span class="lineno">  797</span>&#160;                            <span class="keywordflow">if</span> (side2 &lt; -1e-5) {</div><div class="line"><a name="l00798"></a><span class="lineno">  798</span>&#160;                                <span class="comment">// point is submerged, check if the model is making water</span></div><div class="line"><a name="l00799"></a><span class="lineno">  799</span>&#160;                                <span class="keywordflow">if</span> (child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a98f292173998daf2747cb0f5ba7038a4">isBoundaryVertex</a>() &amp;&amp; fabs(child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>().y()) &gt; 1e-4) {</div><div class="line"><a name="l00800"></a><span class="lineno">  800</span>&#160;                                    <span class="keywordflow">if</span> (!hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>)) {</div><div class="line"><a name="l00801"></a><span class="lineno">  801</span>&#160;                                        hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad6415cb7c8e13ded4537292dd3a06688">addError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>);</div><div class="line"><a name="l00802"></a><span class="lineno">  802</span>&#160;                                        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">leak</a> = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00803"></a><span class="lineno">  803</span>&#160;                                    }</div><div class="line"><a name="l00804"></a><span class="lineno">  804</span>&#160;                                }</div><div class="line"><a name="l00805"></a><span class="lineno">  805</span>&#160;                            }</div><div class="line"><a name="l00806"></a><span class="lineno">  806</span>&#160;                            CheckSubmergedBody(p2, side2);</div><div class="line"><a name="l00807"></a><span class="lineno">  807</span>&#160;                            points.push_back(p2);</div><div class="line"><a name="l00808"></a><span class="lineno">  808</span>&#160;                        }</div><div class="line"><a name="l00809"></a><span class="lineno">  809</span>&#160;                        p1 = p2;</div><div class="line"><a name="l00810"></a><span class="lineno">  810</span>&#160;                        side1 = side2;</div><div class="line"><a name="l00811"></a><span class="lineno">  811</span>&#160;                    } <span class="comment">// end of child face point loop</span></div><div class="line"><a name="l00812"></a><span class="lineno">  812</span>&#160;</div><div class="line"><a name="l00813"></a><span class="lineno">  813</span>&#160;                    <span class="comment">// calculate volume aft of this face</span></div><div class="line"><a name="l00814"></a><span class="lineno">  814</span>&#160;                    <span class="keywordflow">if</span> (points.size() &gt; 2)</div><div class="line"><a name="l00815"></a><span class="lineno">  815</span>&#160;                        submerged = <span class="keyword">true</span>;</div><div class="line"><a name="l00816"></a><span class="lineno">  816</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=3; l&lt;=points.size(); l++)</div><div class="line"><a name="l00817"></a><span class="lineno">  817</span>&#160;                        ProcessTriangle(points[0], points[l-2], points[l-1]);</div><div class="line"><a name="l00818"></a><span class="lineno">  818</span>&#160;                    <span class="keywordflow">if</span> (layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#af1d37cf069e050828f42c034ada4661e">isSymmetric</a>()) {</div><div class="line"><a name="l00819"></a><span class="lineno">  819</span>&#160;                        <span class="comment">// calculate the starboard side of the model</span></div><div class="line"><a name="l00820"></a><span class="lineno">  820</span>&#160;                        points.clear();</div><div class="line"><a name="l00821"></a><span class="lineno">  821</span>&#160;                        p1 = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>()-1)-&gt;getCoordinate();</div><div class="line"><a name="l00822"></a><span class="lineno">  822</span>&#160;                        p1.setY(-p1.y());</div><div class="line"><a name="l00823"></a><span class="lineno">  823</span>&#160;                        <span class="comment">// calculate on which side of the waterplane this point is</span></div><div class="line"><a name="l00824"></a><span class="lineno">  824</span>&#160;                        side1 = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>.<a class="code" href="classShipCAD_1_1Plane.html#a6851b997a300848fcb37b33407165c44">distance</a>(p1);</div><div class="line"><a name="l00825"></a><span class="lineno">  825</span>&#160;                        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=0; l&lt;child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>(); l++) {</div><div class="line"><a name="l00826"></a><span class="lineno">  826</span>&#160;                            p2 = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00827"></a><span class="lineno">  827</span>&#160;                            p2.setY(-p2.y());</div><div class="line"><a name="l00828"></a><span class="lineno">  828</span>&#160;                            side2 = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>.<a class="code" href="classShipCAD_1_1Plane.html#a6851b997a300848fcb37b33407165c44">distance</a>(p2);</div><div class="line"><a name="l00829"></a><span class="lineno">  829</span>&#160;                            <span class="keywordflow">if</span> ((side1 &lt; -1e-5 &amp;&amp; side2 &gt; 1e-5) || (side1 &gt; 1e-5 &amp;&amp; side2 &lt; -1e-5)) {</div><div class="line"><a name="l00830"></a><span class="lineno">  830</span>&#160;                                <span class="comment">// the current linesegment between p1-p2 intersects the waterline plane</span></div><div class="line"><a name="l00831"></a><span class="lineno">  831</span>&#160;                                <span class="keywordflow">if</span> (side1 == side2)</div><div class="line"><a name="l00832"></a><span class="lineno">  832</span>&#160;                                    parameter = .5 * (side1 + side2);</div><div class="line"><a name="l00833"></a><span class="lineno">  833</span>&#160;                                <span class="keywordflow">else</span></div><div class="line"><a name="l00834"></a><span class="lineno">  834</span>&#160;                                    parameter = -side1 / (side2 - side1);</div><div class="line"><a name="l00835"></a><span class="lineno">  835</span>&#160;                                p = p1 + parameter * (p2 - p1);</div><div class="line"><a name="l00836"></a><span class="lineno">  836</span>&#160;                                CheckSubmergedBody(p, 0);</div><div class="line"><a name="l00837"></a><span class="lineno">  837</span>&#160;                                points.push_back(p);</div><div class="line"><a name="l00838"></a><span class="lineno">  838</span>&#160;                            }</div><div class="line"><a name="l00839"></a><span class="lineno">  839</span>&#160;                            <span class="keywordflow">if</span> (side2 &lt;= 1e-5) {</div><div class="line"><a name="l00840"></a><span class="lineno">  840</span>&#160;                                <span class="keywordflow">if</span> (side2 &lt; data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a>)</div><div class="line"><a name="l00841"></a><span class="lineno">  841</span>&#160;                                    data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a> = side2;</div><div class="line"><a name="l00842"></a><span class="lineno">  842</span>&#160;                                <span class="comment">// p2 lies also on or under the waterlineplane</span></div><div class="line"><a name="l00843"></a><span class="lineno">  843</span>&#160;                                <span class="keywordflow">if</span> (side2 &lt; -1e-5) {</div><div class="line"><a name="l00844"></a><span class="lineno">  844</span>&#160;                                    <span class="comment">// point is submerged, check if the model is making water</span></div><div class="line"><a name="l00845"></a><span class="lineno">  845</span>&#160;                                    <span class="keywordflow">if</span> (child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a98f292173998daf2747cb0f5ba7038a4">isBoundaryVertex</a>() &amp;&amp; fabs(child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>().y()) &gt; 1e-4) {</div><div class="line"><a name="l00846"></a><span class="lineno">  846</span>&#160;                                        <span class="keywordflow">if</span> (!hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>)) {</div><div class="line"><a name="l00847"></a><span class="lineno">  847</span>&#160;                                            hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad6415cb7c8e13ded4537292dd3a06688">addError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>);</div><div class="line"><a name="l00848"></a><span class="lineno">  848</span>&#160;                                            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">leak</a> = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00849"></a><span class="lineno">  849</span>&#160;                                        }</div><div class="line"><a name="l00850"></a><span class="lineno">  850</span>&#160;                                    }</div><div class="line"><a name="l00851"></a><span class="lineno">  851</span>&#160;                                }</div><div class="line"><a name="l00852"></a><span class="lineno">  852</span>&#160;                                CheckSubmergedBody(p2, side2);</div><div class="line"><a name="l00853"></a><span class="lineno">  853</span>&#160;                                points.push_back(p2);</div><div class="line"><a name="l00854"></a><span class="lineno">  854</span>&#160;                            }</div><div class="line"><a name="l00855"></a><span class="lineno">  855</span>&#160;                            p1 = p2;</div><div class="line"><a name="l00856"></a><span class="lineno">  856</span>&#160;                            side1 = side2;</div><div class="line"><a name="l00857"></a><span class="lineno">  857</span>&#160;                        } <span class="comment">// end of face point loop</span></div><div class="line"><a name="l00858"></a><span class="lineno">  858</span>&#160;                        <span class="comment">// calculate volume aft of this face</span></div><div class="line"><a name="l00859"></a><span class="lineno">  859</span>&#160;                        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=3; l&lt;=points.size(); l++)</div><div class="line"><a name="l00860"></a><span class="lineno">  860</span>&#160;                            ProcessTriangle(points[0], points[l-1], points[l-2]);</div><div class="line"><a name="l00861"></a><span class="lineno">  861</span>&#160;                    } <span class="comment">// end of symmetric face if</span></div><div class="line"><a name="l00862"></a><span class="lineno">  862</span>&#160;                } <span class="comment">// end of face loop</span></div><div class="line"><a name="l00863"></a><span class="lineno">  863</span>&#160;            } <span class="comment">// end of subdiv control face loop</span></div><div class="line"><a name="l00864"></a><span class="lineno">  864</span>&#160;        } <span class="comment">// end of layers</span></div><div class="line"><a name="l00865"></a><span class="lineno">  865</span>&#160;</div><div class="line"><a name="l00866"></a><span class="lineno">  866</span>&#160;        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a> = -data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a>;</div><div class="line"><a name="l00867"></a><span class="lineno">  867</span>&#160;        <span class="keywordflow">if</span> (first_point) {</div><div class="line"><a name="l00868"></a><span class="lineno">  868</span>&#160;            <span class="comment">// no intersection with the watersurface found, the ship is either</span></div><div class="line"><a name="l00869"></a><span class="lineno">  869</span>&#160;            <span class="comment">// not submerged or totally submerged</span></div><div class="line"><a name="l00870"></a><span class="lineno">  870</span>&#160;            <span class="keywordflow">if</span> (!submerged) {</div><div class="line"><a name="l00871"></a><span class="lineno">  871</span>&#160;                hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad6415cb7c8e13ded4537292dd3a06688">addError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0a0813d6e8a63bd1d17941b321715da4dd">feNothingSubmerged</a>);</div><div class="line"><a name="l00872"></a><span class="lineno">  872</span>&#160;                data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">absolute_draft</a> = 0;</div><div class="line"><a name="l00873"></a><span class="lineno">  873</span>&#160;            }</div><div class="line"><a name="l00874"></a><span class="lineno">  874</span>&#160;        }</div><div class="line"><a name="l00875"></a><span class="lineno">  875</span>&#160;        <span class="keywordflow">if</span> (hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">hasError</a>(<a class="code" href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">feMakingWater</a>)) {</div><div class="line"><a name="l00876"></a><span class="lineno">  876</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a> = 0;</div><div class="line"><a name="l00877"></a><span class="lineno">  877</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a> = <a class="code" href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ZERO</a>;</div><div class="line"><a name="l00878"></a><span class="lineno">  878</span>&#160;        }</div><div class="line"><a name="l00879"></a><span class="lineno">  879</span>&#160;</div><div class="line"><a name="l00880"></a><span class="lineno">  880</span>&#160;        <a class="code" href="classShipCAD_1_1ProjectSettings.html">ProjectSettings</a>&amp; ps = hydro_calc-&gt;<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ac1dc0e446e711461bb3747326efd8df6">getOwner</a>()-&gt;<a class="code" href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">getProjectSettings</a>();</div><div class="line"><a name="l00881"></a><span class="lineno">  881</span>&#160;</div><div class="line"><a name="l00882"></a><span class="lineno">  882</span>&#160;        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a92d1a8a97eb9b21bad485e40ac4461a0">displacement</a> = <a class="code" href="namespaceShipCAD.html#ad3ca198e79658bf065f1c1c416f23670">VolumeToDisplacement</a>(data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a>,</div><div class="line"><a name="l00883"></a><span class="lineno">  883</span>&#160;                                                 ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad6289f32228b3a33c2c30db45339c438">getWaterDensity</a>(),</div><div class="line"><a name="l00884"></a><span class="lineno">  884</span>&#160;                                                 ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a13b2f490e08d61b09a59d2d5008dba47">getAppendageCoefficient</a>(),</div><div class="line"><a name="l00885"></a><span class="lineno">  885</span>&#160;                                                 ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#af9e707de58afaa87f639c2426dbb1161">getUnits</a>());</div><div class="line"><a name="l00886"></a><span class="lineno">  886</span>&#160;        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">length_waterline</a> = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a332be807e8373521c238d82b9dcedc38">wl_max</a>.x() - data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a3bb2750b6306d9e8ae09bb4eebb1ed0c">wl_min</a>.x();</div><div class="line"><a name="l00887"></a><span class="lineno">  887</span>&#160;        data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ab79755f5814572be0dfd3ae3ba214fca">beam_waterline</a> = data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a332be807e8373521c238d82b9dcedc38">wl_max</a>.y() - data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a3bb2750b6306d9e8ae09bb4eebb1ed0c">wl_min</a>.y();</div><div class="line"><a name="l00888"></a><span class="lineno">  888</span>&#160;        <span class="keywordflow">if</span> (data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a> != 0) {</div><div class="line"><a name="l00889"></a><span class="lineno">  889</span>&#160;            <span class="comment">// translate center of buoyancy back to the original origin</span></div><div class="line"><a name="l00890"></a><span class="lineno">  890</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a> = new_origin + data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a> / data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a>;</div><div class="line"><a name="l00891"></a><span class="lineno">  891</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a> = RotatePoint(data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>);</div><div class="line"><a name="l00892"></a><span class="lineno">  892</span>&#160;            <span class="keywordflow">if</span> (data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">length_waterline</a> != 0) {</div><div class="line"><a name="l00893"></a><span class="lineno">  893</span>&#160;                data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a783b71d811732bbc002b52f21d63c83a">lcb_perc</a> = 100 * (data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">center_of_buoyancy</a>.x() - ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a194fe12f81ed80e691e8a89c88d91a0b">getMainframeLocation</a>()) / data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">length_waterline</a>;</div><div class="line"><a name="l00894"></a><span class="lineno">  894</span>&#160;            }</div><div class="line"><a name="l00895"></a><span class="lineno">  895</span>&#160;            <span class="comment">// apply appendage coeff</span></div><div class="line"><a name="l00896"></a><span class="lineno">  896</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">volume</a> *= ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a13b2f490e08d61b09a59d2d5008dba47">getAppendageCoefficient</a>();</div><div class="line"><a name="l00897"></a><span class="lineno">  897</span>&#160;        }</div><div class="line"><a name="l00898"></a><span class="lineno">  898</span>&#160;    }</div><div class="line"><a name="l00899"></a><span class="lineno">  899</span>&#160;};</div><div class="line"><a name="l00900"></a><span class="lineno">  900</span>&#160;</div><div class="line"><a name="l00901"></a><span class="lineno">  901</span>&#160;<span class="comment">// used in calculate</span></div><div class="line"><a name="l00902"></a><span class="lineno"><a class="line" href="structStationAreaCalculation.html">  902</a></span>&#160;<span class="keyword">struct </span><a class="code" href="structStationAreaCalculation.html">StationAreaCalculation</a></div><div class="line"><a name="l00903"></a><span class="lineno">  903</span>&#160;{</div><div class="line"><a name="l00904"></a><span class="lineno"><a class="line" href="structStationAreaCalculation.html#ad1b380c3cc7135b5d659c7efb5a961c2">  904</a></span>&#160;    <a class="code" href="structShipCAD_1_1HydrostaticsData.html">HydrostaticsData</a>&amp; <a class="code" href="structStationAreaCalculation.html#ad1b380c3cc7135b5d659c7efb5a961c2">data</a>;</div><div class="line"><a name="l00905"></a><span class="lineno"><a class="line" href="structStationAreaCalculation.html#a84d2ad6a33b1d6e2db182bebf0a5d7af">  905</a></span>&#160;    <a class="code" href="classShipCAD_1_1ShipCADModel.html">ShipCADModel</a>* <a class="code" href="structStationAreaCalculation.html#a84d2ad6a33b1d6e2db182bebf0a5d7af">owner</a>;</div><div class="line"><a name="l00906"></a><span class="lineno"><a class="line" href="structStationAreaCalculation.html#aeca509dbb47e4d9eca53b5e0c959dd79">  906</a></span>&#160;    <a class="code" href="structStationAreaCalculation.html#aeca509dbb47e4d9eca53b5e0c959dd79">StationAreaCalculation</a>(<a class="code" href="structShipCAD_1_1HydrostaticsData.html">HydrostaticsData</a>&amp; d, <a class="code" href="classShipCAD_1_1ShipCADModel.html">ShipCADModel</a>* o)</div><div class="line"><a name="l00907"></a><span class="lineno">  907</span>&#160;        : data(d), owner(o) {}</div><div class="line"><a name="l00908"></a><span class="lineno"><a class="line" href="structStationAreaCalculation.html#a8f6cf7b08869c75ac1c54bff232ce2ed">  908</a></span>&#160;    <span class="keywordtype">void</span> operator() (<a class="code" href="classShipCAD_1_1Intersection.html">Intersection</a>* intersect)</div><div class="line"><a name="l00909"></a><span class="lineno">  909</span>&#160;    {</div><div class="line"><a name="l00910"></a><span class="lineno">  910</span>&#160;        QVector3D tmp3d;</div><div class="line"><a name="l00911"></a><span class="lineno">  911</span>&#160;        QVector2D tmp2d;</div><div class="line"><a name="l00912"></a><span class="lineno">  912</span>&#160;        <span class="keywordtype">float</span> area;</div><div class="line"><a name="l00913"></a><span class="lineno">  913</span>&#160;        <a class="code" href="classShipCAD_1_1Intersection.html">Intersection</a> frame(owner, intersect-&gt;<a class="code" href="classShipCAD_1_1Intersection.html#a1b93db56e5877226b30871754bba9838">getIntersectionType</a>(), intersect-&gt;<a class="code" href="classShipCAD_1_1Intersection.html#ac0b838a811f8df5c2fa0b0ea44ba4bb7">getPlane</a>(), <span class="keyword">true</span>);</div><div class="line"><a name="l00914"></a><span class="lineno">  914</span>&#160;        frame.<a class="code" href="classShipCAD_1_1Intersection.html#a9e5c13aed9e318f7a5edf02214cfc6f9">calculateArea</a>(data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">waterline_plane</a>, &amp;area, &amp;tmp3d, &amp;tmp2d);</div><div class="line"><a name="l00915"></a><span class="lineno">  915</span>&#160;        <span class="keywordflow">if</span> (area != 0)</div><div class="line"><a name="l00916"></a><span class="lineno">  916</span>&#160;            data.<a class="code" href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">sac</a>.push_back(QVector2D(-frame.getPlane().d(), area));</div><div class="line"><a name="l00917"></a><span class="lineno">  917</span>&#160;    }</div><div class="line"><a name="l00918"></a><span class="lineno">  918</span>&#160;};</div><div class="line"><a name="l00919"></a><span class="lineno">  919</span>&#160;</div><div class="line"><a name="l00920"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#ab0c8f5dc5c576e6e9eae5fb27fd5bdd0">  920</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ab0c8f5dc5c576e6e9eae5fb27fd5bdd0">HydrostaticCalc::calculate</a>()</div><div class="line"><a name="l00921"></a><span class="lineno">  921</span>&#160;{</div><div class="line"><a name="l00922"></a><span class="lineno">  922</span>&#160;    QVector3D p, p1, p2, p3;</div><div class="line"><a name="l00923"></a><span class="lineno">  923</span>&#160;    <span class="keywordtype">bool</span> first_point = <span class="keyword">true</span>;</div><div class="line"><a name="l00924"></a><span class="lineno">  924</span>&#160;    <span class="keywordtype">float</span> parameter;</div><div class="line"><a name="l00925"></a><span class="lineno">  925</span>&#160;</div><div class="line"><a name="l00926"></a><span class="lineno">  926</span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l00927"></a><span class="lineno">  927</span>&#160;    <span class="keywordflow">if</span> (!_owner-&gt;isBuild())</div><div class="line"><a name="l00928"></a><span class="lineno">  928</span>&#160;        _owner-&gt;rebuildModel(<span class="keyword">true</span>);</div><div class="line"><a name="l00929"></a><span class="lineno">  929</span>&#160;</div><div class="line"><a name="l00930"></a><span class="lineno">  930</span>&#160;    <span class="comment">// calculate overall extents of the hull alone</span></div><div class="line"><a name="l00931"></a><span class="lineno">  931</span>&#160;    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> i=0; i&lt;_owner-&gt;getSurface()-&gt;numberOfLayers(); i++) {</div><div class="line"><a name="l00932"></a><span class="lineno">  932</span>&#160;        <a class="code" href="classShipCAD_1_1SubdivisionLayer.html">SubdivisionLayer</a>* layer = _owner-&gt;getSurface()-&gt;getLayer(i);</div><div class="line"><a name="l00933"></a><span class="lineno">  933</span>&#160;        <span class="keywordflow">if</span> (layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a1d2811b35f699b4eda6a08b543863096">useInHydrostatics</a>()) {</div><div class="line"><a name="l00934"></a><span class="lineno">  934</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j=0; j&lt;layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#ad0d77de06b53814e248fc9bbfa908252">numberOfFaces</a>(); j++) {</div><div class="line"><a name="l00935"></a><span class="lineno">  935</span>&#160;                <a class="code" href="classShipCAD_1_1SubdivisionControlFace.html">SubdivisionControlFace</a>* face = layer-&gt;<a class="code" href="classShipCAD_1_1SubdivisionLayer.html#a2e1538a000268fe5f56bf2bea4973c23">getFace</a>(j);</div><div class="line"><a name="l00936"></a><span class="lineno">  936</span>&#160;                <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k=0; k&lt;face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6a79fec036f3d7d52214a280e878a038">numberOfChildren</a>(); k++) {</div><div class="line"><a name="l00937"></a><span class="lineno">  937</span>&#160;                    <a class="code" href="classShipCAD_1_1SubdivisionFace.html">SubdivisionFace</a>* child = face-&gt;<a class="code" href="classShipCAD_1_1SubdivisionControlFace.html#a6f015666ee5e626ce3aed4973f8d12a7">getChild</a>(k);</div><div class="line"><a name="l00938"></a><span class="lineno">  938</span>&#160;                    <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> l=0; l&lt;child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">numberOfPoints</a>(); l++) {</div><div class="line"><a name="l00939"></a><span class="lineno">  939</span>&#160;                        p2 = child-&gt;<a class="code" href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">getPoint</a>(l)-&gt;<a class="code" href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">getCoordinate</a>();</div><div class="line"><a name="l00940"></a><span class="lineno">  940</span>&#160;                        <span class="keywordflow">if</span> (first_point) {</div><div class="line"><a name="l00941"></a><span class="lineno">  941</span>&#160;                            _data.model_min = p2;</div><div class="line"><a name="l00942"></a><span class="lineno">  942</span>&#160;                            _data.model_max = p2;</div><div class="line"><a name="l00943"></a><span class="lineno">  943</span>&#160;                            first_point = <span class="keyword">false</span>;</div><div class="line"><a name="l00944"></a><span class="lineno">  944</span>&#160;                        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l00945"></a><span class="lineno">  945</span>&#160;                            <a class="code" href="namespaceShipCAD.html#aa5d3fc63603d716d3e24244049e1e510">MinMax</a>(p2, _data.model_min, _data.model_max);</div><div class="line"><a name="l00946"></a><span class="lineno">  946</span>&#160;                        }</div><div class="line"><a name="l00947"></a><span class="lineno">  947</span>&#160;                    }</div><div class="line"><a name="l00948"></a><span class="lineno">  948</span>&#160;                }</div><div class="line"><a name="l00949"></a><span class="lineno">  949</span>&#160;            }</div><div class="line"><a name="l00950"></a><span class="lineno">  950</span>&#160;        }</div><div class="line"><a name="l00951"></a><span class="lineno">  951</span>&#160;    }</div><div class="line"><a name="l00952"></a><span class="lineno">  952</span>&#160;</div><div class="line"><a name="l00953"></a><span class="lineno">  953</span>&#160;    <span class="comment">// setup volume calculation using our waterline plane</span></div><div class="line"><a name="l00954"></a><span class="lineno">  954</span>&#160;    <a class="code" href="structVolumeCalc.html">VolumeCalc</a> vc(<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a157563b0f0258d21a9be615e092d5b21">getWlPlane</a>(), <span class="keyword">this</span>);</div><div class="line"><a name="l00955"></a><span class="lineno">  955</span>&#160;    vc.<a class="code" href="structVolumeCalc.html#a9dc91b671e810b1bd4236565a89caf05">run</a>();</div><div class="line"><a name="l00956"></a><span class="lineno">  956</span>&#160;    </div><div class="line"><a name="l00957"></a><span class="lineno">  957</span>&#160;    <a class="code" href="classShipCAD_1_1ProjectSettings.html">ProjectSettings</a>&amp; ps = _owner-&gt;getProjectSettings();</div><div class="line"><a name="l00958"></a><span class="lineno">  958</span>&#160;</div><div class="line"><a name="l00959"></a><span class="lineno">  959</span>&#160;    <span class="keywordtype">float</span> submerged_length = _data.sub_max.x() - _data.sub_min.x();</div><div class="line"><a name="l00960"></a><span class="lineno">  960</span>&#160;    <span class="keywordtype">float</span> submerged_width = _data.sub_max.y() - _data.sub_min.y();</div><div class="line"><a name="l00961"></a><span class="lineno">  961</span>&#160;</div><div class="line"><a name="l00962"></a><span class="lineno">  962</span>&#160;    QVector2D tmpp2d;</div><div class="line"><a name="l00963"></a><span class="lineno">  963</span>&#160;</div><div class="line"><a name="l00964"></a><span class="lineno">  964</span>&#160;    <span class="comment">// calculate mainframe properties</span></div><div class="line"><a name="l00965"></a><span class="lineno">  965</span>&#160;    <span class="keywordflow">if</span> (_data.volume &gt; 0 &amp;&amp; _errors.size() == 0 &amp;&amp; (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceafb6824df148d1417a4db618e6b4dc4f6">hcMainframe</a>) || <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">hcAll</a>))) {</div><div class="line"><a name="l00966"></a><span class="lineno">  966</span>&#160;        _mainframe-&gt;setIntersectionType(<a class="code" href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fdaf57b8e7252f2c55c001df410276926e3">fiStation</a>);</div><div class="line"><a name="l00967"></a><span class="lineno">  967</span>&#160;        _mainframe-&gt;setUseHydrostaticsSurfacesOnly(<span class="keyword">true</span>);</div><div class="line"><a name="l00968"></a><span class="lineno">  968</span>&#160;        _mainframe-&gt;setPlane(<a class="code" href="classShipCAD_1_1Plane.html">Plane</a>(1,0,0,-ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a194fe12f81ed80e691e8a89c88d91a0b">getMainframeLocation</a>()));</div><div class="line"><a name="l00969"></a><span class="lineno">  969</span>&#160;        _mainframe-&gt;calculateArea(_data.waterline_plane, &amp;_data.mainframe_area, &amp;_data.mainframe_cog, &amp;tmpp2d);</div><div class="line"><a name="l00970"></a><span class="lineno">  970</span>&#160;        _data.mainframe_cog.setZ(_data.mainframe_cog.z() - _data.model_min.z());</div><div class="line"><a name="l00971"></a><span class="lineno">  971</span>&#160;        <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#aef0458c7bfa6e484a155e78eca0d0202">getHydrostaticCoefficients</a>() == <a class="code" href="namespaceShipCAD.html#a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2">fcActualData</a>) {</div><div class="line"><a name="l00972"></a><span class="lineno">  972</span>&#160;            <span class="keywordflow">if</span> (submerged_width * _draft != 0.0) {</div><div class="line"><a name="l00973"></a><span class="lineno">  973</span>&#160;                _data.mainframe_coeff = _data.mainframe_area / (submerged_width * _draft);</div><div class="line"><a name="l00974"></a><span class="lineno">  974</span>&#160;            }</div><div class="line"><a name="l00975"></a><span class="lineno">  975</span>&#160;        } <span class="keywordflow">else</span> <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * _draft != 0) {</div><div class="line"><a name="l00976"></a><span class="lineno">  976</span>&#160;            _data.mainframe_coeff = _data.mainframe_area / (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * _draft);</div><div class="line"><a name="l00977"></a><span class="lineno">  977</span>&#160;        }</div><div class="line"><a name="l00978"></a><span class="lineno">  978</span>&#160;    }</div><div class="line"><a name="l00979"></a><span class="lineno">  979</span>&#160;</div><div class="line"><a name="l00980"></a><span class="lineno">  980</span>&#160;    <span class="comment">// calculate waterline properties</span></div><div class="line"><a name="l00981"></a><span class="lineno">  981</span>&#160;    <span class="keywordflow">if</span> (_data.volume &gt; 0 &amp;&amp; _errors.size() == 0 &amp;&amp; (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceaf80e166aa0cdd03c48f0633f31da8e9f">hcWaterline</a>) || <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">hcAll</a>))) {</div><div class="line"><a name="l00982"></a><span class="lineno">  982</span>&#160;        <a class="code" href="classShipCAD_1_1Intersection.html">Intersection</a> waterplane(_owner, <a class="code" href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fda44c99d1edb96c2c22b5661d927eb9041">fiWaterline</a>, _data.waterline_plane, <span class="keyword">true</span>);</div><div class="line"><a name="l00983"></a><span class="lineno">  983</span>&#160;        waterplane.<a class="code" href="classShipCAD_1_1Intersection.html#aed30bdca43037f72b85c4d53e234fd6c">rebuild</a>();</div><div class="line"><a name="l00984"></a><span class="lineno">  984</span>&#160;        parameter = -1e6;</div><div class="line"><a name="l00985"></a><span class="lineno">  985</span>&#160;        _data.waterplane_entrance_angle = 0;</div><div class="line"><a name="l00986"></a><span class="lineno">  986</span>&#160;        <a class="code" href="classPointerVector.html">SplineVector</a>&amp; wpsplines = waterplane.<a class="code" href="classShipCAD_1_1Intersection.html#a0092acbb149bb6a5c2e1f9a4b300c2da">getSplines</a>();</div><div class="line"><a name="l00987"></a><span class="lineno">  987</span>&#160;        <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> j=0; j&lt;wpsplines.<a class="code" href="classPointerVector.html#a65263559ccd6a9eac2904c691453867b">size</a>(); j++) {</div><div class="line"><a name="l00988"></a><span class="lineno">  988</span>&#160;            <a class="code" href="classShipCAD_1_1Spline.html">Spline</a>* spline = wpsplines.<a class="code" href="classPointerVector.html#af28c2517157ddacfb4d92a4fc73c5a92">get</a>(j);</div><div class="line"><a name="l00989"></a><span class="lineno">  989</span>&#160;            <span class="comment">// rotate all points back to a horizontal plane</span></div><div class="line"><a name="l00990"></a><span class="lineno">  990</span>&#160;            <span class="keywordflow">for</span> (<span class="keywordtype">size_t</span> k=0; k&lt;spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#aa15d52dbfa55ec3b1ec272104a45ebd5">numberOfPoints</a>(); k++) {</div><div class="line"><a name="l00991"></a><span class="lineno">  991</span>&#160;                p1 = spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#a04a94537b420a8d19dc5f78526e9a825">getPoint</a>(k);</div><div class="line"><a name="l00992"></a><span class="lineno">  992</span>&#160;                p2 = vc.<a class="code" href="structVolumeCalc.html#ac075a2bc2a2a39a3e89c8b3184bea996">RotatePoint</a>(p1);</div><div class="line"><a name="l00993"></a><span class="lineno">  993</span>&#160;                spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#ae02af8d5473f952644ac5103d7beebf2">setPoint</a>(k, p2);</div><div class="line"><a name="l00994"></a><span class="lineno">  994</span>&#160;            }</div><div class="line"><a name="l00995"></a><span class="lineno">  995</span>&#160;            <span class="keywordflow">if</span> (spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#aa62cf7afa6461bafce7227ec31875219">value</a>(0).x() &gt; spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#aa62cf7afa6461bafce7227ec31875219">value</a>(1).x())</div><div class="line"><a name="l00996"></a><span class="lineno">  996</span>&#160;                spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#a26293a4ee636c2b968c45731425d5c94">invert_direction</a>();</div><div class="line"><a name="l00997"></a><span class="lineno">  997</span>&#160;            p1 = spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#aa62cf7afa6461bafce7227ec31875219">value</a>(1);</div><div class="line"><a name="l00998"></a><span class="lineno">  998</span>&#160;            <span class="keywordflow">if</span> (p1.x() &gt; parameter) {</div><div class="line"><a name="l00999"></a><span class="lineno">  999</span>&#160;                parameter = p1.x();</div><div class="line"><a name="l01000"></a><span class="lineno"> 1000</span>&#160;                p2 = spline-&gt;<a class="code" href="classShipCAD_1_1Spline.html#aa62cf7afa6461bafce7227ec31875219">value</a>(0.99f);</div><div class="line"><a name="l01001"></a><span class="lineno"> 1001</span>&#160;                <span class="keywordflow">if</span> (p1.x() - p2.x() != 0)</div><div class="line"><a name="l01002"></a><span class="lineno"> 1002</span>&#160;                    _data.waterplane_entrance_angle = <a class="code" href="namespaceShipCAD.html#a3ad1916db38fb61e8a053f944df49cee">RadToDeg</a>(atan((p2.y() - p1.y()) / (p1.x() - p2.x())));</div><div class="line"><a name="l01003"></a><span class="lineno"> 1003</span>&#160;                <span class="keywordflow">else</span></div><div class="line"><a name="l01004"></a><span class="lineno"> 1004</span>&#160;                    _data.waterplane_entrance_angle = 90.0;</div><div class="line"><a name="l01005"></a><span class="lineno"> 1005</span>&#160;                <span class="keywordflow">if</span> (p2.y() &lt; p1.y())</div><div class="line"><a name="l01006"></a><span class="lineno"> 1006</span>&#160;                    _data.waterplane_entrance_angle = -_data.waterplane_entrance_angle;</div><div class="line"><a name="l01007"></a><span class="lineno"> 1007</span>&#160;            }</div><div class="line"><a name="l01008"></a><span class="lineno"> 1008</span>&#160;        }</div><div class="line"><a name="l01009"></a><span class="lineno"> 1009</span>&#160;        waterplane.<a class="code" href="classShipCAD_1_1Intersection.html#a9e5c13aed9e318f7a5edf02214cfc6f9">calculateArea</a>(_data.waterline_plane, &amp;_data.waterplane_area,</div><div class="line"><a name="l01010"></a><span class="lineno"> 1010</span>&#160;                                 &amp;_data.waterplane_cog, &amp;_data.waterplane_mom_inertia);</div><div class="line"><a name="l01011"></a><span class="lineno"> 1011</span>&#160;        <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>() != 0)</div><div class="line"><a name="l01012"></a><span class="lineno"> 1012</span>&#160;            _data.waterplane_coeff = _data.waterplane_area / (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>());</div><div class="line"><a name="l01013"></a><span class="lineno"> 1013</span>&#160;        _data.km_transverse = _data.center_of_buoyancy.z() + _data.waterplane_mom_inertia.x() / _data.volume;</div><div class="line"><a name="l01014"></a><span class="lineno"> 1014</span>&#160;        _data.km_longitudinal = _data.center_of_buoyancy.z() + _data.waterplane_mom_inertia.y() / _data.volume;</div><div class="line"><a name="l01015"></a><span class="lineno"> 1015</span>&#160;    }</div><div class="line"><a name="l01016"></a><span class="lineno"> 1016</span>&#160;</div><div class="line"><a name="l01017"></a><span class="lineno"> 1017</span>&#160;    <span class="comment">// calculate block and prismatic coefficients</span></div><div class="line"><a name="l01018"></a><span class="lineno"> 1018</span>&#160;    <span class="keywordflow">if</span> (_draft != 0) {</div><div class="line"><a name="l01019"></a><span class="lineno"> 1019</span>&#160;        <span class="keywordflow">if</span> (_data.waterplane_area * _draft != 0)</div><div class="line"><a name="l01020"></a><span class="lineno"> 1020</span>&#160;            _data.vert_prism_coefficient = _data.volume / (_data.waterplane_area * _draft);</div><div class="line"><a name="l01021"></a><span class="lineno"> 1021</span>&#160;        <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#aef0458c7bfa6e484a155e78eca0d0202">getHydrostaticCoefficients</a>() == <a class="code" href="namespaceShipCAD.html#a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2">fcActualData</a>) {</div><div class="line"><a name="l01022"></a><span class="lineno"> 1022</span>&#160;            <span class="comment">// block coefficient based on length and beam measured on waterline</span></div><div class="line"><a name="l01023"></a><span class="lineno"> 1023</span>&#160;            <span class="keywordflow">if</span> (submerged_width * submerged_length * _draft != 0)</div><div class="line"><a name="l01024"></a><span class="lineno"> 1024</span>&#160;                _data.block_coefficient = _data.volume / (submerged_width * submerged_length * _draft);</div><div class="line"><a name="l01025"></a><span class="lineno"> 1025</span>&#160;            <span class="comment">// prismatic coefficient based on length and beam measured on waterline</span></div><div class="line"><a name="l01026"></a><span class="lineno"> 1026</span>&#160;            <span class="keywordflow">if</span> (_data.mainframe_area * submerged_length != 0)</div><div class="line"><a name="l01027"></a><span class="lineno"> 1027</span>&#160;                _data.prism_coefficient = _data.volume / (_data.mainframe_area * submerged_length);</div><div class="line"><a name="l01028"></a><span class="lineno"> 1028</span>&#160;        } <span class="keywordflow">else</span> {</div><div class="line"><a name="l01029"></a><span class="lineno"> 1029</span>&#160;            <span class="comment">// block coefficient based on length and beam from settings</span></div><div class="line"><a name="l01030"></a><span class="lineno"> 1030</span>&#160;            <span class="keywordflow">if</span> (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>() * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * _draft != 0)</div><div class="line"><a name="l01031"></a><span class="lineno"> 1031</span>&#160;                _data.block_coefficient = _data.volume / (ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>() * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">getBeam</a>() * _draft);</div><div class="line"><a name="l01032"></a><span class="lineno"> 1032</span>&#160;            <span class="comment">// prismatic coefficient based on length and beam from settings</span></div><div class="line"><a name="l01033"></a><span class="lineno"> 1033</span>&#160;            <span class="keywordflow">if</span> (_data.mainframe_area * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>() != 0)</div><div class="line"><a name="l01034"></a><span class="lineno"> 1034</span>&#160;                _data.prism_coefficient = _data.volume / (_data.mainframe_area * ps.<a class="code" href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">getLength</a>());</div><div class="line"><a name="l01035"></a><span class="lineno"> 1035</span>&#160;        }</div><div class="line"><a name="l01036"></a><span class="lineno"> 1036</span>&#160;    }</div><div class="line"><a name="l01037"></a><span class="lineno"> 1037</span>&#160;</div><div class="line"><a name="l01038"></a><span class="lineno"> 1038</span>&#160;    <span class="comment">// calculate sectional areas</span></div><div class="line"><a name="l01039"></a><span class="lineno"> 1039</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceaad2786c707b686af79e47765eba073d0">hcSAC</a>) || <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">hcAll</a>)) {</div><div class="line"><a name="l01040"></a><span class="lineno"> 1040</span>&#160;        <span class="keywordflow">if</span> (_owner-&gt;getStations().size()) {</div><div class="line"><a name="l01041"></a><span class="lineno"> 1041</span>&#160;            <a class="code" href="structStationAreaCalculation.html">StationAreaCalculation</a> sac(_data, _owner);</div><div class="line"><a name="l01042"></a><span class="lineno"> 1042</span>&#160;            for_each(_owner-&gt;getStations().begin(), _owner-&gt;getStations().end(), sac);</div><div class="line"><a name="l01043"></a><span class="lineno"> 1043</span>&#160;        }</div><div class="line"><a name="l01044"></a><span class="lineno"> 1044</span>&#160;    }</div><div class="line"><a name="l01045"></a><span class="lineno"> 1045</span>&#160;</div><div class="line"><a name="l01046"></a><span class="lineno"> 1046</span>&#160;    <span class="comment">// calculate lateral area and center of gravity</span></div><div class="line"><a name="l01047"></a><span class="lineno"> 1047</span>&#160;    <span class="keywordflow">if</span> (<a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea3d6d84cee5b8c79bf4d75a5dbc084e45">hcLateralArea</a>) || <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">hasCalculation</a>(<a class="code" href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">hcAll</a>)) {</div><div class="line"><a name="l01048"></a><span class="lineno"> 1048</span>&#160;        <a class="code" href="classShipCAD_1_1Intersection.html">Intersection</a> lateralplane(_owner, <a class="code" href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fdabcf8818401977200b532a1e18ec2df70">fiButtock</a>, <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>(0,1,0,-0.001f), <span class="keyword">true</span>);</div><div class="line"><a name="l01049"></a><span class="lineno"> 1049</span>&#160;        lateralplane.<a class="code" href="classShipCAD_1_1Intersection.html#a9e5c13aed9e318f7a5edf02214cfc6f9">calculateArea</a>(_data.waterline_plane, &amp;_data.lateral_area, &amp;_data.lateral_cog, &amp;tmpp2d);</div><div class="line"><a name="l01050"></a><span class="lineno"> 1050</span>&#160;        _data.lateral_cog.setZ(_data.lateral_cog.z() - _data.model_min.z());</div><div class="line"><a name="l01051"></a><span class="lineno"> 1051</span>&#160;    }</div><div class="line"><a name="l01052"></a><span class="lineno"> 1052</span>&#160;</div><div class="line"><a name="l01053"></a><span class="lineno"> 1053</span>&#160;    <span class="comment">// all done!</span></div><div class="line"><a name="l01054"></a><span class="lineno"> 1054</span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l01055"></a><span class="lineno"> 1055</span>&#160;}</div><div class="line"><a name="l01056"></a><span class="lineno"> 1056</span>&#160;</div><div class="line"><a name="l01057"></a><span class="lineno"> 1057</span>&#160;</div><div class="line"><a name="l01058"></a><span class="lineno"><a class="line" href="classShipCAD_1_1HydrostaticCalc.html#ad37fd32bf358c96b6653c6c92fd92c20"> 1058</a></span>&#160;<span class="keywordtype">void</span> <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#ad37fd32bf358c96b6653c6c92fd92c20">HydrostaticCalc::calculateVolume</a>(<span class="keyword">const</span> <a class="code" href="classShipCAD_1_1Plane.html">Plane</a>&amp; waterline_plane)</div><div class="line"><a name="l01059"></a><span class="lineno"> 1059</span>&#160;{</div><div class="line"><a name="l01060"></a><span class="lineno"> 1060</span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">false</span>);</div><div class="line"><a name="l01061"></a><span class="lineno"> 1061</span>&#160;</div><div class="line"><a name="l01062"></a><span class="lineno"> 1062</span>&#160;    <span class="keywordflow">if</span> (!_owner-&gt;isBuild())</div><div class="line"><a name="l01063"></a><span class="lineno"> 1063</span>&#160;        _owner-&gt;rebuildModel(<span class="keyword">true</span>);</div><div class="line"><a name="l01064"></a><span class="lineno"> 1064</span>&#160;</div><div class="line"><a name="l01065"></a><span class="lineno"> 1065</span>&#160;    <a class="code" href="structVolumeCalc.html">VolumeCalc</a> vc(waterline_plane, <span class="keyword">this</span>);</div><div class="line"><a name="l01066"></a><span class="lineno"> 1066</span>&#160;    vc.<a class="code" href="structVolumeCalc.html#a9dc91b671e810b1bd4236565a89caf05">run</a>();</div><div class="line"><a name="l01067"></a><span class="lineno"> 1067</span>&#160;</div><div class="line"><a name="l01068"></a><span class="lineno"> 1068</span>&#160;    <a class="code" href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">setCalculated</a>(<span class="keyword">true</span>);</div><div class="line"><a name="l01069"></a><span class="lineno"> 1069</span>&#160;}</div><div class="ttc" id="structVolumeCalc_html_a6de823cbd9bb3aaedcb398a43b3187a5"><div class="ttname"><a href="structVolumeCalc.html#a6de823cbd9bb3aaedcb398a43b3187a5">VolumeCalc::CosTrim</a></div><div class="ttdeci">float CosTrim</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00683">hydrostaticcalc.cpp:683</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a2d0a1e5f6bf98f8eceb958e5f7e7c73e"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a2d0a1e5f6bf98f8eceb958e5f7e7c73e">ShipCAD::HydrostaticsData::sub_min</a></div><div class="ttdeci">QVector3D sub_min</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00056">hydrostaticcalc.h:56</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a9dc91b671e810b1bd4236565a89caf05"><div class="ttname"><a href="structVolumeCalc.html#a9dc91b671e810b1bd4236565a89caf05">VolumeCalc::run</a></div><div class="ttdeci">void run()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00763">hydrostaticcalc.cpp:763</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a13b2f490e08d61b09a59d2d5008dba47"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a13b2f490e08d61b09a59d2d5008dba47">ShipCAD::ProjectSettings::getAppendageCoefficient</a></div><div class="ttdeci">float getAppendageCoefficient() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00063">projsettings.h:63</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_afea51c7ee52940acebde29bf44206fe2acfe164530006cd2d42457ec37a0ac24b"><div class="ttname"><a href="namespaceShipCAD.html#afea51c7ee52940acebde29bf44206fe2acfe164530006cd2d42457ec37a0ac24b">ShipCAD::fhShort</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00086">shipcadlib.h:86</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ad4b78176732ea80000adb94b5b5669f3"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ad4b78176732ea80000adb94b5b5669f3">ShipCAD::HydrostaticsData::wetted_surface</a></div><div class="ttdeci">float wetted_surface</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00067">hydrostaticcalc.h:67</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a1d801b982c24bce0cf10ffd4b995dda0"><div class="ttname"><a href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0">ShipCAD::hydrostatics_error_t</a></div><div class="ttdeci">hydrostatics_error_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00095">shipcadlib.h:95</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a2c84d37615dd30be37ed0253501fb9a3"><div class="ttname"><a href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3">ShipCAD::hydrostatics_mode_t</a></div><div class="ttdeci">hydrostatics_mode_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00090">shipcadlib.h:90</a></div></div>
<div class="ttc" id="hydrostaticcalc_8h_html"><div class="ttname"><a href="hydrostaticcalc_8h.html">hydrostaticcalc.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html_a04a94537b420a8d19dc5f78526e9a825"><div class="ttname"><a href="classShipCAD_1_1Spline.html#a04a94537b420a8d19dc5f78526e9a825">ShipCAD::Spline::getPoint</a></div><div class="ttdeci">QVector3D getPoint(size_t index) const </div><div class="ttdef"><b>Definition:</b> <a href="spline_8h_source.html#l00144">spline.h:144</a></div></div>
<div class="ttc" id="structStationAreaCalculation_html_aeca509dbb47e4d9eca53b5e0c959dd79"><div class="ttname"><a href="structStationAreaCalculation.html#aeca509dbb47e4d9eca53b5e0c959dd79">StationAreaCalculation::StationAreaCalculation</a></div><div class="ttdeci">StationAreaCalculation(HydrostaticsData &amp;d, ShipCADModel *o)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00906">hydrostaticcalc.cpp:906</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a6528fe532bbb1121c73972906d108835"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a6528fe532bbb1121c73972906d108835">ShipCAD::HydrostaticCalc::setDraft</a></div><div class="ttdeci">void setDraft(float draft)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00147">hydrostaticcalc.cpp:147</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a1d801b982c24bce0cf10ffd4b995dda0a0813d6e8a63bd1d17941b321715da4dd"><div class="ttname"><a href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0a0813d6e8a63bd1d17941b321715da4dd">ShipCAD::feNothingSubmerged</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00096">shipcadlib.h:96</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fceafb6824df148d1417a4db618e6b4dc4f6"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceafb6824df148d1417a4db618e6b4dc4f6">ShipCAD::hcMainframe</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00104">shipcadlib.h:104</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a92d1a8a97eb9b21bad485e40ac4461a0"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a92d1a8a97eb9b21bad485e40ac4461a0">ShipCAD::HydrostaticsData::displacement</a></div><div class="ttdeci">float displacement</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00061">hydrostaticcalc.h:61</a></div></div>
<div class="ttc" id="subdivface_8h_html"><div class="ttname"><a href="subdivface_8h.html">subdivface.h</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a9a7baa66159e203888390eaa63caf708"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a9a7baa66159e203888390eaa63caf708">ShipCAD::CrosscurvesData::displacement</a></div><div class="ttdeci">float displacement</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00097">hydrostaticcalc.h:97</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fce"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fce">ShipCAD::hydrostatics_calc_t</a></div><div class="ttdeci">hydrostatics_calc_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00101">shipcadlib.h:101</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionControlFace_html_a6f015666ee5e626ce3aed4973f8d12a7"><div class="ttname"><a href="classShipCAD_1_1SubdivisionControlFace.html#a6f015666ee5e626ce3aed4973f8d12a7">ShipCAD::SubdivisionControlFace::getChild</a></div><div class="ttdeci">SubdivisionFace * getChild(size_t index) const </div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8cpp_source.html#l01059">subdivface.cpp:1059</a></div></div>
<div class="ttc" id="structDraftData_html_a3f20aeee5cac97b57e9fc5c5315f3ad1"><div class="ttname"><a href="structDraftData.html#a3f20aeee5cac97b57e9fc5c5315f3ad1">DraftData::draft</a></div><div class="ttdeci">float draft</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00575">hydrostaticcalc.cpp:575</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a332be807e8373521c238d82b9dcedc38"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a332be807e8373521c238d82b9dcedc38">ShipCAD::HydrostaticsData::wl_max</a></div><div class="ttdeci">QVector3D wl_max</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00055">hydrostaticcalc.h:55</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a1d801b982c24bce0cf10ffd4b995dda0aabbfd93b3daf55e537540d8d4ac8eb0c"><div class="ttname"><a href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0aabbfd93b3daf55e537540d8d4ac8eb0c">ShipCAD::feNotEnoughBuoyancy</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00098">shipcadlib.h:98</a></div></div>
<div class="ttc" id="projsettings_8h_html"><div class="ttname"><a href="projsettings_8h.html">projsettings.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_a01b0067ca1a669aef5a8ab85bfce41cc"><div class="ttname"><a href="classShipCAD_1_1Plane.html#a01b0067ca1a669aef5a8ab85bfce41cc">ShipCAD::Plane::c</a></div><div class="ttdeci">float c() const </div><div class="ttdef"><b>Definition:</b> <a href="plane_8h_source.html#l00054">plane.h:54</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a2c84d37615dd30be37ed0253501fb9a3aee242838cf07c1950c914a44851804b5"><div class="ttname"><a href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3aee242838cf07c1950c914a44851804b5">ShipCAD::fhMultipleCalculations</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00092">shipcadlib.h:92</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a9bec38a77bf87ab5feb76899e39e4f7b"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a9bec38a77bf87ab5feb76899e39e4f7b">ShipCAD::CrosscurvesData::volume</a></div><div class="ttdeci">float volume</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00096">hydrostaticcalc.h:96</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html_ae02af8d5473f952644ac5103d7beebf2"><div class="ttname"><a href="classShipCAD_1_1Spline.html#ae02af8d5473f952644ac5103d7beebf2">ShipCAD::Spline::setPoint</a></div><div class="ttdeci">void setPoint(size_t index, const QVector3D &amp;p)</div><div class="ttdef"><b>Definition:</b> <a href="spline_8cpp_source.html#l00103">spline.cpp:103</a></div></div>
<div class="ttc" id="structMinMaxData_html_a62b4b4d97aba034731cdb0f11b23d856"><div class="ttname"><a href="structMinMaxData.html#a62b4b4d97aba034731cdb0f11b23d856">MinMaxData::plane_normal</a></div><div class="ttdeci">QVector3D plane_normal</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00453">hydrostaticcalc.cpp:453</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a759e5729cdb86d8367b139e66fecb7d3"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a759e5729cdb86d8367b139e66fecb7d3">ShipCAD::CrosscurvesData::absolute_draft</a></div><div class="ttdeci">float absolute_draft</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00095">hydrostaticcalc.h:95</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a36511f2f033b5488a4f677586f3e8f97"><div class="ttname"><a href="structVolumeCalc.html#a36511f2f033b5488a4f677586f3e8f97">VolumeCalc::SinTrim</a></div><div class="ttdeci">float SinTrim</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00684">hydrostaticcalc.cpp:684</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a5f3432f4d790bbb9c4d75502cb15b7f0"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a5f3432f4d790bbb9c4d75502cb15b7f0">ShipCAD::HydrostaticsData::waterplane_area</a></div><div class="ttdeci">float waterplane_area</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00072">hydrostaticcalc.h:72</a></div></div>
<div class="ttc" id="structVolumeCalc_html_acb7ab639ec6e5c77daf116c6eb58693a"><div class="ttname"><a href="structVolumeCalc.html#acb7ab639ec6e5c77daf116c6eb58693a">VolumeCalc::data</a></div><div class="ttdeci">HydrostaticsData &amp; data</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00690">hydrostaticcalc.cpp:690</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_afea51c7ee52940acebde29bf44206fe2"><div class="ttname"><a href="namespaceShipCAD.html#afea51c7ee52940acebde29bf44206fe2">ShipCAD::hydrostatic_type_t</a></div><div class="ttdeci">hydrostatic_type_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00085">shipcadlib.h:85</a></div></div>
<div class="ttc" id="structVolumeCalc_html_aed779c2eace630d0d41239df4d371407"><div class="ttname"><a href="structVolumeCalc.html#aed779c2eace630d0d41239df4d371407">VolumeCalc::new_origin</a></div><div class="ttdeci">QVector3D new_origin</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00681">hydrostaticcalc.cpp:681</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html">ShipCAD::HydrostaticsData</a></div><div class="ttdoc">Hydrostatics Calculation results. </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00050">hydrostaticcalc.h:50</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ac1dc0e446e711461bb3747326efd8df6"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ac1dc0e446e711461bb3747326efd8df6">ShipCAD::HydrostaticCalc::getOwner</a></div><div class="ttdeci">ShipCADModel * getOwner() const </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00118">hydrostaticcalc.h:118</a></div></div>
<div class="ttc" id="classPointerVector_html_a65263559ccd6a9eac2904c691453867b"><div class="ttname"><a href="classPointerVector.html#a65263559ccd6a9eac2904c691453867b">PointerVector::size</a></div><div class="ttdeci">size_t size() const </div><div class="ttdef"><b>Definition:</b> <a href="pointervec_8h_source.html#l00063">pointervec.h:63</a></div></div>
<div class="ttc" id="structMinMaxData_html_abe1d706394e9836f49ef8cb5dff7bd99"><div class="ttname"><a href="structMinMaxData.html#abe1d706394e9836f49ef8cb5dff7bd99">MinMaxData::lowest_z</a></div><div class="ttdeci">float lowest_z</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00455">hydrostaticcalc.cpp:455</a></div></div>
<div class="ttc" id="shipcadlib_8h_html"><div class="ttname"><a href="shipcadlib_8h.html">shipcadlib.h</a></div></div>
<div class="ttc" id="structVolumeCalc_html_ac1612ccb79673d6800b89a1acf46a028"><div class="ttname"><a href="structVolumeCalc.html#ac1612ccb79673d6800b89a1acf46a028">VolumeCalc::SinHeel</a></div><div class="ttdeci">float SinHeel</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00686">hydrostaticcalc.cpp:686</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionSurface_html_a24b230e51a0c5fb3e7f51d0e2340eb9f"><div class="ttname"><a href="classShipCAD_1_1SubdivisionSurface.html#a24b230e51a0c5fb3e7f51d0e2340eb9f">ShipCAD::SubdivisionSurface::getLayer</a></div><div class="ttdeci">SubdivisionLayer * getLayer(size_t index)</div><div class="ttdef"><b>Definition:</b> <a href="subdivsurface_8cpp_source.html#l01187">subdivsurface.cpp:1187</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_a1d2811b35f699b4eda6a08b543863096"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#a1d2811b35f699b4eda6a08b543863096">ShipCAD::SubdivisionLayer::useInHydrostatics</a></div><div class="ttdeci">bool useInHydrostatics() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8h_source.html#l00092">subdivlayer.h:92</a></div></div>
<div class="ttc" id="structStationAreaCalculation_html_ad1b380c3cc7135b5d659c7efb5a961c2"><div class="ttname"><a href="structStationAreaCalculation.html#ad1b380c3cc7135b5d659c7efb5a961c2">StationAreaCalculation::data</a></div><div class="ttdeci">HydrostaticsData &amp; data</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00904">hydrostaticcalc.cpp:904</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_ac0b838a811f8df5c2fa0b0ea44ba4bb7"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#ac0b838a811f8df5c2fa0b0ea44ba4bb7">ShipCAD::Intersection::getPlane</a></div><div class="ttdeci">Plane getPlane()</div><div class="ttdoc">get the intersection plane </div><div class="ttdef"><b>Definition:</b> <a href="intersection_8h_source.html#l00084">intersection.h:84</a></div></div>
<div class="ttc" id="structVolumeCalc_html_ac075a2bc2a2a39a3e89c8b3184bea996"><div class="ttname"><a href="structVolumeCalc.html#ac075a2bc2a2a39a3e89c8b3184bea996">VolumeCalc::RotatePoint</a></div><div class="ttdeci">QVector3D RotatePoint(QVector3D p)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00709">hydrostaticcalc.cpp:709</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ac100876d13ae75147585c5c0f80801fe"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ac100876d13ae75147585c5c0f80801fe">ShipCAD::HydrostaticsData::waterplane_cog</a></div><div class="ttdeci">QVector3D waterplane_cog</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00073">hydrostaticcalc.h:73</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_af977e4008c66d1a323d105f27622991b"><div class="ttname"><a href="namespaceShipCAD.html#af977e4008c66d1a323d105f27622991b">ShipCAD::DensityStr</a></div><div class="ttdeci">QString DensityStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00071">shipcadlib.cpp:71</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_aef0458c7bfa6e484a155e78eca0d0202"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#aef0458c7bfa6e484a155e78eca0d0202">ShipCAD::ProjectSettings::getHydrostaticCoefficients</a></div><div class="ttdeci">hydrostatic_coeff_t getHydrostaticCoefficients()</div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00055">projsettings.h:55</a></div></div>
<div class="ttc" id="plane_8h_html"><div class="ttname"><a href="plane_8h.html">plane.h</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a0758fd8275aafe6ad813d2a361281bf2"><div class="ttname"><a href="namespaceShipCAD.html#a0758fd8275aafe6ad813d2a361281bf2">ShipCAD::VolStr</a></div><div class="ttdeci">QString VolStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00064">shipcadlib.cpp:64</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a4208b97fe6110516d71e67708186897a"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a4208b97fe6110516d71e67708186897a">ShipCAD::HydrostaticsData::mainframe_coeff</a></div><div class="ttdeci">float mainframe_coeff</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00071">hydrostaticcalc.h:71</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a2a7fc6a194bc1e78ecce8ab16512d1eb"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a2a7fc6a194bc1e78ecce8ab16512d1eb">ShipCAD::HydrostaticsData::vert_prism_coefficient</a></div><div class="ttdeci">float vert_prism_coefficient</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00082">hydrostaticcalc.h:82</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a1132babc4274499418c2dc8ea6f86314"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a1132babc4274499418c2dc8ea6f86314">ShipCAD::HydrostaticsData::leak</a></div><div class="ttdeci">QVector3D leak</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00068">hydrostaticcalc.h:68</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ab47218dccdf4c94d5989b2e5b13d8603"><div class="ttname"><a href="namespaceShipCAD.html#ab47218dccdf4c94d5989b2e5b13d8603">ShipCAD::ZERO2</a></div><div class="ttdeci">const QVector2D ZERO2</div></div>
<div class="ttc" id="namespaceShipCAD_html_a81e47e31f89000550b007c0f9a4d09aa"><div class="ttname"><a href="namespaceShipCAD.html#a81e47e31f89000550b007c0f9a4d09aa">ShipCAD::UnifiedNormal</a></div><div class="ttdeci">QVector3D UnifiedNormal(const QVector3D &amp;p1, const QVector3D &amp;p2, const QVector3D &amp;p3)</div><div class="ttdoc">find the unit normal of a plane defined by 3 points </div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00233">utility.cpp:233</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a1ea6de1b52289e8392e8d499ae4aad04"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a1ea6de1b52289e8392e8d499ae4aad04">ShipCAD::CrosscurvesData::waterline_plane</a></div><div class="ttdeci">Plane waterline_plane</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00094">hydrostaticcalc.h:94</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_acd93669bc08fa097974d41fbaf4dc81f"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#acd93669bc08fa097974d41fbaf4dc81f">ShipCAD::HydrostaticsData::model_min</a></div><div class="ttdeci">QVector3D model_min</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00052">hydrostaticcalc.h:52</a></div></div>
<div class="ttc" id="structVolumeCalc_html"><div class="ttname"><a href="structVolumeCalc.html">VolumeCalc</a></div><div class="ttdoc">calculate the volume of underwater body </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00679">hydrostaticcalc.cpp:679</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a3bb2750b6306d9e8ae09bb4eebb1ed0c"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a3bb2750b6306d9e8ae09bb4eebb1ed0c">ShipCAD::HydrostaticsData::wl_min</a></div><div class="ttdeci">QVector3D wl_min</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00054">hydrostaticcalc.h:54</a></div></div>
<div class="ttc" id="structShipCAD_1_1LayerProperties_html_a4e9844dd95994725401ad93c5c3a00e9"><div class="ttname"><a href="structShipCAD_1_1LayerProperties.html#a4e9844dd95994725401ad93c5c3a00e9">ShipCAD::LayerProperties::weight</a></div><div class="ttdeci">float weight</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00189">shipcadlib.h:189</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html">ShipCAD::HydrostaticCalc</a></div><div class="ttdoc">Initialize and execute Hydrostatics Data calculation for a waterplane. </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00106">hydrostaticcalc.h:106</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac6a7a28b4b063771afae92decb602da5"><div class="ttname"><a href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5">ShipCAD::unit_type_t</a></div><div class="ttdeci">unit_type_t</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00118">shipcadlib.h:118</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a6857139c04212164c5557cc816f80345"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a6857139c04212164c5557cc816f80345">ShipCAD::HydrostaticsData::absolute_draft</a></div><div class="ttdeci">float absolute_draft</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00059">hydrostaticcalc.h:59</a></div></div>
<div class="ttc" id="namespacestd_html"><div class="ttname"><a href="namespacestd.html">std</a></div><div class="ttdoc">STL namespace. </div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a0de723cd5ae0e18953fb7ad5a0f5dadf"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a0de723cd5ae0e18953fb7ad5a0f5dadf">ShipCAD::CrosscurvesData::center_of_buoyancy</a></div><div class="ttdeci">QVector3D center_of_buoyancy</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00098">hydrostaticcalc.h:98</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a3ad1916db38fb61e8a053f944df49cee"><div class="ttname"><a href="namespaceShipCAD.html#a3ad1916db38fb61e8a053f944df49cee">ShipCAD::RadToDeg</a></div><div class="ttdeci">float RadToDeg(float rad)</div><div class="ttdoc">convert radians to degrees </div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00248">utility.cpp:248</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_ab16487a794947608cace81a06552b2b1"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#ab16487a794947608cace81a06552b2b1">ShipCAD::ShipCADModel::findLowestHydrostaticsPoint</a></div><div class="ttdeci">float findLowestHydrostaticsPoint() const </div><div class="ttdoc">get the lowest underwater point of hull </div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8cpp_source.html#l01066">shipcadmodel.cpp:1066</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ad37fd32bf358c96b6653c6c92fd92c20"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ad37fd32bf358c96b6653c6c92fd92c20">ShipCAD::HydrostaticCalc::calculateVolume</a></div><div class="ttdeci">void calculateVolume(const Plane &amp;waterline_plane)</div><div class="ttdoc">calculate the volume of the ship below plane </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l01058">hydrostaticcalc.cpp:1058</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a07e433d13508d3342e7f6a50604c40d3"><div class="ttname"><a href="structVolumeCalc.html#a07e433d13508d3342e7f6a50604c40d3">VolumeCalc::keel</a></div><div class="ttdeci">QVector3D keel</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00682">hydrostaticcalc.cpp:682</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_ad6289f32228b3a33c2c30db45339c438"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#ad6289f32228b3a33c2c30db45339c438">ShipCAD::ProjectSettings::getWaterDensity</a></div><div class="ttdeci">float getWaterDensity() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00088">projsettings.h:88</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html">ShipCAD::ProjectSettings</a></div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00047">projsettings.h:47</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac6a7a28b4b063771afae92decb602da5a77b7e6068aae48ecd768c4a6e7637fe7"><div class="ttname"><a href="namespaceShipCAD.html#ac6a7a28b4b063771afae92decb602da5a77b7e6068aae48ecd768c4a6e7637fe7">ShipCAD::fuImperial</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00120">shipcadlib.h:120</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a3e22cf4f03f02a3c0d14e7f66610fd80"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a3e22cf4f03f02a3c0d14e7f66610fd80">ShipCAD::HydrostaticsData::waterplane_entrance_angle</a></div><div class="ttdeci">float waterplane_entrance_angle</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00074">hydrostaticcalc.h:74</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html_aa62cf7afa6461bafce7227ec31875219"><div class="ttname"><a href="classShipCAD_1_1Spline.html#aa62cf7afa6461bafce7227ec31875219">ShipCAD::Spline::value</a></div><div class="ttdeci">QVector3D value(float parameter) const </div><div class="ttdef"><b>Definition:</b> <a href="spline_8cpp_source.html#l00806">spline.cpp:806</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea286a6df9f1d51b98fcbb54f17fbe94d6">ShipCAD::hcAll</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00102">shipcadlib.h:102</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2"><div class="ttname"><a href="namespaceShipCAD.html#a9cf77f0900561de9efc572dcbad4dbbda3ccd536b7a23b7c708cde0d5ba9633d2">ShipCAD::fcActualData</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00125">shipcadlib.h:125</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html_a26293a4ee636c2b968c45731425d5c94"><div class="ttname"><a href="classShipCAD_1_1Spline.html#a26293a4ee636c2b968c45731425d5c94">ShipCAD::Spline::invert_direction</a></div><div class="ttdeci">void invert_direction()</div><div class="ttdoc">invert the direction of this spline </div><div class="ttdef"><b>Definition:</b> <a href="spline_8cpp_source.html#l00698">spline.cpp:698</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html">ShipCAD::CrosscurvesData</a></div><div class="ttdoc">crosscurves data </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00092">hydrostaticcalc.h:92</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a2c84d37615dd30be37ed0253501fb9a3ab322857f69d00b378f611acbb12bc663"><div class="ttname"><a href="namespaceShipCAD.html#a2c84d37615dd30be37ed0253501fb9a3ab322857f69d00b378f611acbb12bc663">ShipCAD::fhSingleCalculation</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00091">shipcadlib.h:91</a></div></div>
<div class="ttc" id="structStationAreaCalculation_html_a84d2ad6a33b1d6e2db182bebf0a5d7af"><div class="ttname"><a href="structStationAreaCalculation.html#a84d2ad6a33b1d6e2db182bebf0a5d7af">StationAreaCalculation::owner</a></div><div class="ttdeci">ShipCADModel * owner</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00905">hydrostaticcalc.cpp:905</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fceaf80e166aa0cdd03c48f0633f31da8e9f"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceaf80e166aa0cdd03c48f0633f31da8e9f">ShipCAD::hcWaterline</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00105">shipcadlib.h:105</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a0deeafff07f3bb77184df959bbd91266"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a0deeafff07f3bb77184df959bbd91266">ShipCAD::HydrostaticCalc::setCalculated</a></div><div class="ttdeci">void setCalculated(bool calc)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00137">hydrostaticcalc.cpp:137</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_abfc3e3da906e630cf6b763bd3559c630"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#abfc3e3da906e630cf6b763bd3559c630">ShipCAD::HydrostaticCalc::getErrorString</a></div><div class="ttdeci">QString getErrorString() const </div><div class="ttdoc">get the errors with current calculation </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00104">hydrostaticcalc.cpp:104</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_aecd19708f7ebadb4321af93565ffc184"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#aecd19708f7ebadb4321af93565ffc184">ShipCAD::HydrostaticCalc::getTrimAngle</a></div><div class="ttdeci">float getTrimAngle() const </div><div class="ttdoc">get the trim angle for this calculation </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00118">hydrostaticcalc.cpp:118</a></div></div>
<div class="ttc" id="structShipCAD_1_1LayerProperties_html_a1b4bc8254c8cb90df594bc7905ce3e22"><div class="ttname"><a href="structShipCAD_1_1LayerProperties.html#a1b4bc8254c8cb90df594bc7905ce3e22">ShipCAD::LayerProperties::surface_center_of_gravity</a></div><div class="ttdeci">QVector3D surface_center_of_gravity</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00190">shipcadlib.h:190</a></div></div>
<div class="ttc" id="classPointerVector_html_af28c2517157ddacfb4d92a4fc73c5a92"><div class="ttname"><a href="classPointerVector.html#af28c2517157ddacfb4d92a4fc73c5a92">PointerVector::get</a></div><div class="ttdeci">T * get(size_t index)</div><div class="ttdef"><b>Definition:</b> <a href="pointervec_8h_source.html#l00066">pointervec.h:66</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_a22eacfdf763840d534d45b18b789f8c7"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#a22eacfdf763840d534d45b18b789f8c7">ShipCAD::SubdivisionLayer::getName</a></div><div class="ttdeci">QString getName() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8cpp_source.html#l00074">subdivlayer.cpp:74</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac344c080c66b4394cb988cf88c726029"><div class="ttname"><a href="namespaceShipCAD.html#ac344c080c66b4394cb988cf88c726029">ShipCAD::DegToRad</a></div><div class="ttdeci">float DegToRad(float deg)</div><div class="ttdoc">convert degrees to radians </div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00243">utility.cpp:243</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ae65aa54bcbfb059f11aa174cfaa0447b"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ae65aa54bcbfb059f11aa174cfaa0447b">ShipCAD::HydrostaticsData::length_waterline</a></div><div class="ttdeci">float length_waterline</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00064">hydrostaticcalc.h:64</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html_aa15d52dbfa55ec3b1ec272104a45ebd5"><div class="ttname"><a href="classShipCAD_1_1Spline.html#aa15d52dbfa55ec3b1ec272104a45ebd5">ShipCAD::Spline::numberOfPoints</a></div><div class="ttdeci">size_t numberOfPoints() const </div><div class="ttdef"><b>Definition:</b> <a href="spline_8h_source.html#l00157">spline.h:157</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html"><div class="ttname"><a href="classShipCAD_1_1Intersection.html">ShipCAD::Intersection</a></div><div class="ttdoc">List of curves intersecting hull. </div><div class="ttdef"><b>Definition:</b> <a href="intersection_8h_source.html#l00058">intersection.h:58</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_acfbee81bded1b067a23cfc8cc9c00855"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#acfbee81bded1b067a23cfc8cc9c00855">ShipCAD::HydrostaticsData::volume</a></div><div class="ttdeci">float volume</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00060">hydrostaticcalc.h:60</a></div></div>
<div class="ttc" id="subdivpoint_8h_html"><div class="ttname"><a href="subdivpoint_8h.html">subdivpoint.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_ad96c7b5dca9156a767dde327cf5b55c1"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#ad96c7b5dca9156a767dde327cf5b55c1">ShipCAD::ProjectSettings::getBeam</a></div><div class="ttdeci">float getBeam() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00070">projsettings.h:70</a></div></div>
<div class="ttc" id="structDraftData_html"><div class="ttname"><a href="structDraftData.html">DraftData</a></div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00573">hydrostaticcalc.cpp:573</a></div></div>
<div class="ttc" id="structVolumeCalc_html_ab639da79639aeb33b3aaeb429283f8ca"><div class="ttname"><a href="structVolumeCalc.html#ab639da79639aeb33b3aaeb429283f8ca">VolumeCalc::first_point</a></div><div class="ttdeci">bool first_point</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00688">hydrostaticcalc.cpp:688</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a503a1f2299db9d5ae923e598b8ee31ba"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a503a1f2299db9d5ae923e598b8ee31ba">ShipCAD::HydrostaticsData::sac</a></div><div class="ttdeci">std::vector&lt; QVector2D &gt; sac</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00083">hydrostaticcalc.h:83</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a8db64934b729181fbf65b767f6260bff"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a8db64934b729181fbf65b767f6260bff">ShipCAD::ProjectSettings::getFileCreatedBy</a></div><div class="ttdeci">QString getFileCreatedBy() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00152">projsettings.h:152</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_a4923525b6c8c111be4959e2fac45d24f"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#a4923525b6c8c111be4959e2fac45d24f">ShipCAD::SubdivisionLayer::getThickness</a></div><div class="ttdeci">float getThickness() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8h_source.html#l00101">subdivlayer.h:101</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ab79755f5814572be0dfd3ae3ba214fca"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ab79755f5814572be0dfd3ae3ba214fca">ShipCAD::HydrostaticsData::beam_waterline</a></div><div class="ttdeci">float beam_waterline</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00065">hydrostaticcalc.h:65</a></div></div>
<div class="ttc" id="structMinMaxData_html_a3d27ad5adf37db4728e700f914bc2ab3"><div class="ttname"><a href="structMinMaxData.html#a3d27ad5adf37db4728e700f914bc2ab3">MinMaxData::lowest_point</a></div><div class="ttdeci">QVector3D lowest_point</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00451">hydrostaticcalc.cpp:451</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_af9e707de58afaa87f639c2426dbb1161"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#af9e707de58afaa87f639c2426dbb1161">ShipCAD::ProjectSettings::getUnits</a></div><div class="ttdeci">unit_type_t getUnits() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00164">projsettings.h:164</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a9319fb2ad054a595b6e3b3fd4059a3ae"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a9319fb2ad054a595b6e3b3fd4059a3ae">ShipCAD::HydrostaticsData::model_max</a></div><div class="ttdeci">QVector3D model_max</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00053">hydrostaticcalc.h:53</a></div></div>
<div class="ttc" id="structShipCAD_1_1LayerProperties_html_aff6dab68937efc1abd7bb5066373f514"><div class="ttname"><a href="structShipCAD_1_1LayerProperties.html#aff6dab68937efc1abd7bb5066373f514">ShipCAD::LayerProperties::surface_area</a></div><div class="ttdeci">float surface_area</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00188">shipcadlib.h:188</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a03844b7fff96e8ade21a0dc5ff72a1b6"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a03844b7fff96e8ade21a0dc5ff72a1b6">ShipCAD::ProjectSettings::getDesigner</a></div><div class="ttdeci">QString getDesigner() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00144">projsettings.h:144</a></div></div>
<div class="ttc" id="classPointerVector_html"><div class="ttname"><a href="classPointerVector.html">PointerVector&lt; Spline &gt;</a></div></div>
<div class="ttc" id="structMinMaxData_html_aafb5f4af5f4cbcce8f2473b85abf511c"><div class="ttname"><a href="structMinMaxData.html#aafb5f4af5f4cbcce8f2473b85abf511c">MinMaxData::calculated</a></div><div class="ttdeci">bool calculated</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00456">hydrostaticcalc.cpp:456</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_a2ef81e9310257ad80b087181f3191b4a"><div class="ttname"><a href="classShipCAD_1_1Plane.html#a2ef81e9310257ad80b087181f3191b4a">ShipCAD::Plane::projectPointOnPlane</a></div><div class="ttdeci">QVector3D projectPointOnPlane(const QVector3D &amp;p) const </div><div class="ttdoc">project a point onto a plane </div><div class="ttdef"><b>Definition:</b> <a href="plane_8cpp_source.html#l00124">plane.cpp:124</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ab3a6e316a991426c74673025439f123c"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ab3a6e316a991426c74673025439f123c">ShipCAD::HydrostaticsData::sub_max</a></div><div class="ttdeci">QVector3D sub_max</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00057">hydrostaticcalc.h:57</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_adeadfbedd4733c4c242dafbe55935397"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#adeadfbedd4733c4c242dafbe55935397">ShipCAD::ProjectSettings::getName</a></div><div class="ttdeci">QString getName() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00140">projsettings.h:140</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a5f92422c5175c94b265581fd19f1da24"><div class="ttname"><a href="structVolumeCalc.html#a5f92422c5175c94b265581fd19f1da24">VolumeCalc::CosHeel</a></div><div class="ttdeci">float CosHeel</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00685">hydrostaticcalc.cpp:685</a></div></div>
<div class="ttc" id="structMinMaxData_html_a10cf6d95b5b6d24b6b2e874e9fb05362"><div class="ttname"><a href="structMinMaxData.html#a10cf6d95b5b6d24b6b2e874e9fb05362">MinMaxData::max_draft</a></div><div class="ttdeci">float max_draft</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00454">hydrostaticcalc.cpp:454</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a949bc53a1634b268b43de672807480fb"><div class="ttname"><a href="namespaceShipCAD.html#a949bc53a1634b268b43de672807480fb">ShipCAD::ZERO</a></div><div class="ttdeci">const QVector3D ZERO</div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ac59c717b9869f0aacca4305fd81d4882"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ac59c717b9869f0aacca4305fd81d4882">ShipCAD::HydrostaticsData::block_coefficient</a></div><div class="ttdeci">float block_coefficient</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00066">hydrostaticcalc.h:66</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionFace_html"><div class="ttname"><a href="classShipCAD_1_1SubdivisionFace.html">ShipCAD::SubdivisionFace</a></div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8h_source.html#l00058">subdivface.h:58</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionControlFace_html_a6a79fec036f3d7d52214a280e878a038"><div class="ttname"><a href="classShipCAD_1_1SubdivisionControlFace.html#a6a79fec036f3d7d52214a280e878a038">ShipCAD::SubdivisionControlFace::numberOfChildren</a></div><div class="ttdeci">size_t numberOfChildren() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8h_source.html#l00310">subdivface.h:310</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_a9e5c13aed9e318f7a5edf02214cfc6f9"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#a9e5c13aed9e318f7a5edf02214cfc6f9">ShipCAD::Intersection::calculateArea</a></div><div class="ttdeci">void calculateArea(const Plane &amp;wlplane, float *area, QVector3D *cog, QVector2D *moment_of_inertia)</div><div class="ttdoc">calculate area, center of gravity, moment of inertia of intersection </div><div class="ttdef"><b>Definition:</b> <a href="intersection_8cpp_source.html#l00357">intersection.cpp:357</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_adb8e8e29d28e2da0e75e30c0636f034b"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#adb8e8e29d28e2da0e75e30c0636f034b">ShipCAD::HydrostaticCalc::hasCalculation</a></div><div class="ttdeci">bool hasCalculation(hydrostatics_calc_t ty) const </div><div class="ttdoc">is this type of calculation set </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00184">hydrostaticcalc.cpp:184</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a1ba65b28e4351a4d97bc64cd11ddab90"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a1ba65b28e4351a4d97bc64cd11ddab90">ShipCAD::HydrostaticsData::lateral_area</a></div><div class="ttdeci">float lateral_area</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00079">hydrostaticcalc.h:79</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionPoint_html_a98f292173998daf2747cb0f5ba7038a4"><div class="ttname"><a href="classShipCAD_1_1SubdivisionPoint.html#a98f292173998daf2747cb0f5ba7038a4">ShipCAD::SubdivisionPoint::isBoundaryVertex</a></div><div class="ttdeci">bool isBoundaryVertex() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivpoint_8cpp_source.html#l00146">subdivpoint.cpp:146</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionControlFace_html"><div class="ttname"><a href="classShipCAD_1_1SubdivisionControlFace.html">ShipCAD::SubdivisionControlFace</a></div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8h_source.html#l00219">subdivface.h:219</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a62749df66958d1389c3cc6f6f03d42fb"><div class="ttname"><a href="namespaceShipCAD.html#a62749df66958d1389c3cc6f6f03d42fb">ShipCAD::WeightStr</a></div><div class="ttdeci">QString WeightStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00078">shipcadlib.cpp:78</a></div></div>
<div class="ttc" id="subdivlayer_8h_html"><div class="ttname"><a href="subdivlayer_8h.html">subdivlayer.h</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a0a51e62f7d169fa892eaabc6a1937256"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a0a51e62f7d169fa892eaabc6a1937256">ShipCAD::HydrostaticsData::km_longitudinal</a></div><div class="ttdeci">float km_longitudinal</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00078">hydrostaticcalc.h:78</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_a2e1538a000268fe5f56bf2bea4973c23"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#a2e1538a000268fe5f56bf2bea4973c23">ShipCAD::SubdivisionLayer::getFace</a></div><div class="ttdeci">SubdivisionControlFace * getFace(size_t index)</div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8cpp_source.html#l00083">subdivlayer.cpp:83</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_acabee310fcde293fcb0d9a5fd5effe27"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#acabee310fcde293fcb0d9a5fd5effe27">ShipCAD::HydrostaticsData::prism_coefficient</a></div><div class="ttdeci">float prism_coefficient</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00081">hydrostaticcalc.h:81</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a0fe6c2dde04c7172c334736516950b51"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a0fe6c2dde04c7172c334736516950b51">ShipCAD::ProjectSettings::getDraft</a></div><div class="ttdeci">float getDraft() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00074">projsettings.h:74</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a527c0f0526a159e3d7cb7ddd4925c295"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a527c0f0526a159e3d7cb7ddd4925c295">ShipCAD::HydrostaticCalc::construct</a></div><div class="ttdeci">static HydrostaticCalc * construct(ShipCADModel *owner)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00086">hydrostaticcalc.cpp:86</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a61df8d7421f2900cbc18a6565963c66e"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a61df8d7421f2900cbc18a6565963c66e">ShipCAD::HydrostaticCalc::setHydrostaticType</a></div><div class="ttdeci">void setHydrostaticType(hydrostatic_type_t ty)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00163">hydrostaticcalc.cpp:163</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a09403d93ebe095a41b6a29ba9b740b65"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a09403d93ebe095a41b6a29ba9b740b65">ShipCAD::HydrostaticCalc::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00092">hydrostaticcalc.cpp:92</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_adf79c9ba86dd3112fc098141195fcac5"><div class="ttname"><a href="classShipCAD_1_1Plane.html#adf79c9ba86dd3112fc098141195fcac5">ShipCAD::Plane::b</a></div><div class="ttdeci">float b() const </div><div class="ttdef"><b>Definition:</b> <a href="plane_8h_source.html#l00052">plane.h:52</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aa56834b730aafdf2786ddc9a60a046fda44c99d1edb96c2c22b5661d927eb9041"><div class="ttname"><a href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fda44c99d1edb96c2c22b5661d927eb9041">ShipCAD::fiWaterline</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00114">shipcadlib.h:114</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a8ae6f41fd9799cb17a855a9b4f89c5fb"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a8ae6f41fd9799cb17a855a9b4f89c5fb">ShipCAD::HydrostaticCalc::hasError</a></div><div class="ttdeci">bool hasError(hydrostatics_error_t error) const </div><div class="ttdoc">does this calculation have this type of error </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00179">hydrostaticcalc.cpp:179</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a194fe12f81ed80e691e8a89c88d91a0b"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a194fe12f81ed80e691e8a89c88d91a0b">ShipCAD::ProjectSettings::getMainframeLocation</a></div><div class="ttdeci">float getMainframeLocation() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8cpp_source.html#l00079">projsettings.cpp:79</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionFace_html_a68bc7676c4f254ddb19e04f8cb5ba76f"><div class="ttname"><a href="classShipCAD_1_1SubdivisionFace.html#a68bc7676c4f254ddb19e04f8cb5ba76f">ShipCAD::SubdivisionFace::getPoint</a></div><div class="ttdeci">SubdivisionPoint * getPoint(size_t index) const </div><div class="ttdoc">get face point </div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8cpp_source.html#l00147">subdivface.cpp:147</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a382835ae6396b82371b605d662fd1696"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a382835ae6396b82371b605d662fd1696">ShipCAD::HydrostaticCalc::~HydrostaticCalc</a></div><div class="ttdeci">~HydrostaticCalc()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00081">hydrostaticcalc.cpp:81</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aa5d3fc63603d716d3e24244049e1e510"><div class="ttname"><a href="namespaceShipCAD.html#aa5d3fc63603d716d3e24244049e1e510">ShipCAD::MinMax</a></div><div class="ttdeci">void MinMax(const QVector3D &amp;p, QVector3D &amp;min, QVector3D &amp;max)</div><div class="ttdoc">find the min and max coordinates from a point </div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00040">utility.cpp:40</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024"><div class="ttname"><a href="namespaceShipCAD.html#a1d801b982c24bce0cf10ffd4b995dda0ab5378e2d38e12b21bcb9f89b4da7a024">ShipCAD::feMakingWater</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00097">shipcadlib.h:97</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_a94a8eed8ac8ff4ad8287a0a1113e3271"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#a94a8eed8ac8ff4ad8287a0a1113e3271">ShipCAD::ShipCADModel::getProjectSettings</a></div><div class="ttdeci">ProjectSettings &amp; getProjectSettings()</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00076">shipcadmodel.h:76</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ab0c8f5dc5c576e6e9eae5fb27fd5bdd0"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ab0c8f5dc5c576e6e9eae5fb27fd5bdd0">ShipCAD::HydrostaticCalc::calculate</a></div><div class="ttdeci">void calculate()</div><div class="ttdoc">make all calculations specified </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00920">hydrostaticcalc.cpp:920</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_adbadaf4eafa63f1f10778f4c3e1f61a4"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#adbadaf4eafa63f1f10778f4c3e1f61a4">ShipCAD::HydrostaticsData::km_transverse</a></div><div class="ttdeci">float km_transverse</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00077">hydrostaticcalc.h:77</a></div></div>
<div class="ttc" id="structStationAreaCalculation_html"><div class="ttname"><a href="structStationAreaCalculation.html">StationAreaCalculation</a></div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00902">hydrostaticcalc.cpp:902</a></div></div>
<div class="ttc" id="structMinMaxData_html_ab422a9e59c6bb2bc9a28bbb002d5b09f"><div class="ttname"><a href="structMinMaxData.html#ab422a9e59c6bb2bc9a28bbb002d5b09f">MinMaxData::lowest_leak</a></div><div class="ttdeci">QVector3D lowest_leak</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00452">hydrostaticcalc.cpp:452</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ace579596fa77d8e3ea4f854ca033ed83"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ace579596fa77d8e3ea4f854ca033ed83">ShipCAD::HydrostaticCalc::setTrim</a></div><div class="ttdeci">void setTrim(float trim)</div><div class="ttdoc">set the trim for this calculation (distance, not angle) </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00171">hydrostaticcalc.cpp:171</a></div></div>
<div class="ttc" id="structShipCAD_1_1CrosscurvesData_html_a2fcb82c940ad6a13c07a25f44bbd5efd"><div class="ttname"><a href="structShipCAD_1_1CrosscurvesData.html#a2fcb82c940ad6a13c07a25f44bbd5efd">ShipCAD::CrosscurvesData::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00065">hydrostaticcalc.cpp:65</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_ad0d77de06b53814e248fc9bbfa908252"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#ad0d77de06b53814e248fc9bbfa908252">ShipCAD::SubdivisionLayer::numberOfFaces</a></div><div class="ttdeci">size_t numberOfFaces() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8h_source.html#l00071">subdivlayer.h:71</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ae6bf118e2e5e89a8e8d7ea7675fdee22"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ae6bf118e2e5e89a8e8d7ea7675fdee22">ShipCAD::HydrostaticCalc::setHeelingAngle</a></div><div class="ttdeci">void setHeelingAngle(float angle)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00155">hydrostaticcalc.cpp:155</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_a4c29a9dd9e31c652a82b6398c8f7b983"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#a4c29a9dd9e31c652a82b6398c8f7b983">ShipCAD::ShipCADModel::getFilename</a></div><div class="ttdeci">QString getFilename() const </div><div class="ttdoc">name of file </div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8cpp_source.html#l00259">shipcadmodel.cpp:259</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a5b3b6d4983faa3c309ddc85981945993"><div class="ttname"><a href="structVolumeCalc.html#a5b3b6d4983faa3c309ddc85981945993">VolumeCalc::hydro_calc</a></div><div class="ttdeci">HydrostaticCalc * hydro_calc</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00689">hydrostaticcalc.cpp:689</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_a1b93db56e5877226b30871754bba9838"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#a1b93db56e5877226b30871754bba9838">ShipCAD::Intersection::getIntersectionType</a></div><div class="ttdeci">intersection_type_t getIntersectionType()</div><div class="ttdef"><b>Definition:</b> <a href="intersection_8h_source.html#l00106">intersection.h:106</a></div></div>
<div class="ttc" id="utility_8h_html"><div class="ttname"><a href="utility_8h.html">utility.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionFace_html_abd79b6dfadd10befe94b524a34063b27"><div class="ttname"><a href="classShipCAD_1_1SubdivisionFace.html#abd79b6dfadd10befe94b524a34063b27">ShipCAD::SubdivisionFace::numberOfPoints</a></div><div class="ttdeci">size_t numberOfPoints() const </div><div class="ttdoc">number of points for this face </div><div class="ttdef"><b>Definition:</b> <a href="subdivface_8h_source.html#l00122">subdivface.h:122</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9"><div class="ttname"><a href="namespaceShipCAD.html#a2d7cf2fbcca4bd1dd75fd9ceb4ff0fa9">ShipCAD::AreaStr</a></div><div class="ttdeci">QString AreaStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00043">shipcadlib.cpp:43</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_aed30bdca43037f72b85c4d53e234fd6c"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#aed30bdca43037f72b85c4d53e234fd6c">ShipCAD::Intersection::rebuild</a></div><div class="ttdeci">virtual void rebuild()</div><div class="ttdef"><b>Definition:</b> <a href="intersection_8cpp_source.html#l00218">intersection.cpp:218</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a21a672444dafcae8293fe2b8be4dc071"><div class="ttname"><a href="structVolumeCalc.html#a21a672444dafcae8293fe2b8be4dc071">VolumeCalc::VolumeCalc</a></div><div class="ttdeci">VolumeCalc(const Plane &amp;wl, HydrostaticCalc *hc)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00692">hydrostaticcalc.cpp:692</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html_a6941ad7a2b167419e844823fa8461019"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html#a6941ad7a2b167419e844823fa8461019">ShipCAD::ShipCADModel::getSurface</a></div><div class="ttdeci">SubdivisionSurface * getSurface()</div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00071">shipcadmodel.h:71</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a875b9708e91db4a8f06ddbcc8a22d830"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a875b9708e91db4a8f06ddbcc8a22d830">ShipCAD::HydrostaticCalc::isCalculated</a></div><div class="ttdeci">bool isCalculated()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00130">hydrostaticcalc.h:130</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aef3e2265fc686fbe6b50b081dcc4e6ff"><div class="ttname"><a href="namespaceShipCAD.html#aef3e2265fc686fbe6b50b081dcc4e6ff">ShipCAD::LengthStr</a></div><div class="ttdeci">QString LengthStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00050">shipcadlib.cpp:50</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_a2163245dc7153d1590811ab2902d6ee4"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#a2163245dc7153d1590811ab2902d6ee4">ShipCAD::Intersection::clear</a></div><div class="ttdeci">virtual void clear()</div><div class="ttdef"><b>Definition:</b> <a href="intersection_8cpp_source.html#l00064">intersection.cpp:64</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html">ShipCAD::SubdivisionLayer</a></div><div class="ttdoc">Layer, collection of SubdivisionControlFaces. </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8h_source.html#l00061">subdivlayer.h:61</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a7687e8e358e8deb57e363ad8e5cfef17"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a7687e8e358e8deb57e363ad8e5cfef17">ShipCAD::ProjectSettings::getComment</a></div><div class="ttdeci">QString getComment() const </div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00148">projsettings.h:148</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_a01d1e42109b5645919c004f6d7a30b68"><div class="ttname"><a href="namespaceShipCAD.html#a01d1e42109b5645919c004f6d7a30b68">ShipCAD::InertiaStr</a></div><div class="ttdeci">QString InertiaStr(unit_type_t units)</div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8cpp_source.html#l00057">shipcadlib.cpp:57</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_af1d37cf069e050828f42c034ada4661e"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#af1d37cf069e050828f42c034ada4661e">ShipCAD::SubdivisionLayer::isSymmetric</a></div><div class="ttdeci">bool isSymmetric() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8h_source.html#l00086">subdivlayer.h:86</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_aabcae04d59358b87b9d5fb4ffda83f1a"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#aabcae04d59358b87b9d5fb4ffda83f1a">ShipCAD::HydrostaticCalc::getData</a></div><div class="ttdeci">HydrostaticsData &amp; getData()</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00134">hydrostaticcalc.h:134</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fceaad2786c707b686af79e47765eba073d0"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fceaad2786c707b686af79e47765eba073d0">ShipCAD::hcSAC</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00106">shipcadlib.h:106</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a157563b0f0258d21a9be615e092d5b21"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a157563b0f0258d21a9be615e092d5b21">ShipCAD::HydrostaticCalc::getWlPlane</a></div><div class="ttdeci">Plane getWlPlane() const </div><div class="ttdoc">get the waterline plane (from draft, trim, and heeling angle) </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00125">hydrostaticcalc.cpp:125</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ae378a523725f5718c9f2b55103f08dcb"><div class="ttname"><a href="namespaceShipCAD.html#ae378a523725f5718c9f2b55103f08dcb">ShipCAD::MakeLength</a></div><div class="ttdeci">QString MakeLength(float value, int decimals, int des_length)</div><div class="ttdoc">Create a formatted string from a float value. </div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00603">utility.cpp:603</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a7ea81ac589a3b24424b4176c734c7a37"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a7ea81ac589a3b24424b4176c734c7a37">ShipCAD::HydrostaticsData::clear</a></div><div class="ttdeci">void clear()</div><div class="ttdoc">reset all data to default values </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00045">hydrostaticcalc.cpp:45</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a7573a510a6b53e56a79f4042e41ee89e"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a7573a510a6b53e56a79f4042e41ee89e">ShipCAD::HydrostaticCalc::balance</a></div><div class="ttdeci">bool balance(float displacement, bool freetotrim, CrosscurvesData &amp;output)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00579">hydrostaticcalc.cpp:579</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a4d5eb630367999a611b95dd0d2c2242c"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a4d5eb630367999a611b95dd0d2c2242c">ShipCAD::HydrostaticsData::waterplane_coeff</a></div><div class="ttdeci">float waterplane_coeff</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00075">hydrostaticcalc.h:75</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_a6851b997a300848fcb37b33407165c44"><div class="ttname"><a href="classShipCAD_1_1Plane.html#a6851b997a300848fcb37b33407165c44">ShipCAD::Plane::distance</a></div><div class="ttdeci">float distance(const QVector3D &amp;point) const </div><div class="ttdef"><b>Definition:</b> <a href="plane_8cpp_source.html#l00072">plane.cpp:72</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_a7755d7967aae2e083c5d08fed49d9eef"><div class="ttname"><a href="classShipCAD_1_1Plane.html#a7755d7967aae2e083c5d08fed49d9eef">ShipCAD::Plane::d</a></div><div class="ttdeci">float d() const </div><div class="ttdef"><b>Definition:</b> <a href="plane_8h_source.html#l00056">plane.h:56</a></div></div>
<div class="ttc" id="shipcadmodel_8h_html"><div class="ttname"><a href="shipcadmodel_8h.html">shipcadmodel.h</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html"><div class="ttname"><a href="classShipCAD_1_1Plane.html">ShipCAD::Plane</a></div><div class="ttdef"><b>Definition:</b> <a href="plane_8h_source.html#l00039">plane.h:39</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_af93141f846f6622bb146cda042962303"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#af93141f846f6622bb146cda042962303">ShipCAD::HydrostaticsData::waterline_plane</a></div><div class="ttdeci">Plane waterline_plane</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00058">hydrostaticcalc.h:58</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_ad6415cb7c8e13ded4537292dd3a06688"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#ad6415cb7c8e13ded4537292dd3a06688">ShipCAD::HydrostaticCalc::addError</a></div><div class="ttdeci">void addError(hydrostatics_error_t error)</div><div class="ttdoc">add this error type to the calculation </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00145">hydrostaticcalc.h:145</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a56877acf4c33b3cab96ce381217c7a3b"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a56877acf4c33b3cab96ce381217c7a3b">ShipCAD::HydrostaticCalc::HydrostaticCalc</a></div><div class="ttdeci">HydrostaticCalc(ShipCADModel *owner)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00073">hydrostaticcalc.cpp:73</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a783b71d811732bbc002b52f21d63c83a"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a783b71d811732bbc002b52f21d63c83a">ShipCAD::HydrostaticsData::lcb_perc</a></div><div class="ttdeci">float lcb_perc</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00063">hydrostaticcalc.h:63</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a76b82a9e1e96365185536a8fc799e235"><div class="ttname"><a href="structVolumeCalc.html#a76b82a9e1e96365185536a8fc799e235">VolumeCalc::CheckSubmergedBody</a></div><div class="ttdeci">void CheckSubmergedBody(QVector3D p, float side)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00717">hydrostaticcalc.cpp:717</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aa56834b730aafdf2786ddc9a60a046fdaf57b8e7252f2c55c001df410276926e3"><div class="ttname"><a href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fdaf57b8e7252f2c55c001df410276926e3">ShipCAD::fiStation</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00112">shipcadlib.h:112</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionSurface_html_a011480014cfb68430c9f60aff474936c"><div class="ttname"><a href="classShipCAD_1_1SubdivisionSurface.html#a011480014cfb68430c9f60aff474936c">ShipCAD::SubdivisionSurface::numberOfLayers</a></div><div class="ttdeci">size_t numberOfLayers() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivsurface_8h_source.html#l00285">subdivsurface.h:285</a></div></div>
<div class="ttc" id="structMinMaxData_html"><div class="ttname"><a href="structMinMaxData.html">MinMaxData</a></div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00449">hydrostaticcalc.cpp:449</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ac9ff7fc96a52fceafa83edc0d5d06fcea3d6d84cee5b8c79bf4d75a5dbc084e45"><div class="ttname"><a href="namespaceShipCAD.html#ac9ff7fc96a52fceafa83edc0d5d06fcea3d6d84cee5b8c79bf4d75a5dbc084e45">ShipCAD::hcLateralArea</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00107">shipcadlib.h:107</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_ad3ca198e79658bf065f1c1c416f23670"><div class="ttname"><a href="namespaceShipCAD.html#ad3ca198e79658bf065f1c1c416f23670">ShipCAD::VolumeToDisplacement</a></div><div class="ttdeci">float VolumeToDisplacement(float volume, float density, float appcoeff, unit_type_t units)</div><div class="ttdoc">convert volume to displacement given density, appendage coefficient and unit type ...</div><div class="ttdef"><b>Definition:</b> <a href="utility_8cpp_source.html#l00581">utility.cpp:581</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a7b27fef68486f663fd325ef316032a03"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a7b27fef68486f663fd325ef316032a03">ShipCAD::HydrostaticCalc::getHeelingAngle</a></div><div class="ttdeci">float getHeelingAngle() const </div><div class="ttdoc">get the heeling angle for this calculation </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00162">hydrostaticcalc.h:162</a></div></div>
<div class="ttc" id="namespaceShipCAD_html_aa56834b730aafdf2786ddc9a60a046fdabcf8818401977200b532a1e18ec2df70"><div class="ttname"><a href="namespaceShipCAD.html#aa56834b730aafdf2786ddc9a60a046fdabcf8818401977200b532a1e18ec2df70">ShipCAD::fiButtock</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00113">shipcadlib.h:113</a></div></div>
<div class="ttc" id="namespaceShipCAD_html"><div class="ttname"><a href="namespaceShipCAD.html">ShipCAD</a></div><div class="ttdef"><b>Definition:</b> <a href="backgroundimage_8h_source.html#l00039">backgroundimage.h:39</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a95e0e1aa5d11f49cb0f0553ba45af085"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a95e0e1aa5d11f49cb0f0553ba45af085">ShipCAD::HydrostaticCalc::addHeader</a></div><div class="ttdeci">void addHeader(QStringList &amp;strings)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00350">hydrostaticcalc.cpp:350</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_adc0c4f2f0c5b110a968e45642dc5eeeb"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#adc0c4f2f0c5b110a968e45642dc5eeeb">ShipCAD::HydrostaticsData::lateral_cog</a></div><div class="ttdeci">QVector3D lateral_cog</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00080">hydrostaticcalc.h:80</a></div></div>
<div class="ttc" id="classShipCAD_1_1ShipCADModel_html"><div class="ttname"><a href="classShipCAD_1_1ShipCADModel.html">ShipCAD::ShipCADModel</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadmodel_8h_source.html#l00063">shipcadmodel.h:63</a></div></div>
<div class="ttc" id="structVolumeCalc_html_ae4d9b88d4538df112bdf297a3c6364b8"><div class="ttname"><a href="structVolumeCalc.html#ae4d9b88d4538df112bdf297a3c6364b8">VolumeCalc::ProcessTriangle</a></div><div class="ttdeci">void ProcessTriangle(QVector3D p1, QVector3D p2, QVector3D p3)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00740">hydrostaticcalc.cpp:740</a></div></div>
<div class="ttc" id="structDraftData_html_ad911e175c740aa5e4e1bba6f5db3b448"><div class="ttname"><a href="structDraftData.html#ad911e175c740aa5e4e1bba6f5db3b448">DraftData::displ</a></div><div class="ttdeci">float displ</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00576">hydrostaticcalc.cpp:576</a></div></div>
<div class="ttc" id="classShipCAD_1_1Spline_html"><div class="ttname"><a href="classShipCAD_1_1Spline.html">ShipCAD::Spline</a></div><div class="ttdoc">spline entity used in intersections etc </div><div class="ttdef"><b>Definition:</b> <a href="spline_8h_source.html#l00053">spline.h:53</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_ab2b49d5dea89ae998116c8ff4cac2b53"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#ab2b49d5dea89ae998116c8ff4cac2b53">ShipCAD::HydrostaticsData::mainframe_area</a></div><div class="ttdeci">float mainframe_area</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00069">hydrostaticcalc.h:69</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionPoint_html_a285325115089a1b99be4480bf6079bf1"><div class="ttname"><a href="classShipCAD_1_1SubdivisionPoint.html#a285325115089a1b99be4480bf6079bf1">ShipCAD::SubdivisionPoint::getCoordinate</a></div><div class="ttdeci">QVector3D getCoordinate() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivpoint_8h_source.html#l00140">subdivpoint.h:140</a></div></div>
<div class="ttc" id="structVolumeCalc_html_a3bc27914e09f86d93cb28daad90dddc1"><div class="ttname"><a href="structVolumeCalc.html#a3bc27914e09f86d93cb28daad90dddc1">VolumeCalc::first_submerged_point</a></div><div class="ttdeci">bool first_submerged_point</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00687">hydrostaticcalc.cpp:687</a></div></div>
<div class="ttc" id="structShipCAD_1_1LayerProperties_html"><div class="ttname"><a href="structShipCAD_1_1LayerProperties.html">ShipCAD::LayerProperties</a></div><div class="ttdef"><b>Definition:</b> <a href="shipcadlib_8h_source.html#l00186">shipcadlib.h:186</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a316b31598f53f036c7008cc4910293f8"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a316b31598f53f036c7008cc4910293f8">ShipCAD::HydrostaticsData::center_of_buoyancy</a></div><div class="ttdeci">QVector3D center_of_buoyancy</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00062">hydrostaticcalc.h:62</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionSurface_html"><div class="ttname"><a href="classShipCAD_1_1SubdivisionSurface.html">ShipCAD::SubdivisionSurface</a></div><div class="ttdoc">Subdivision Surface. </div><div class="ttdef"><b>Definition:</b> <a href="subdivsurface_8h_source.html#l00103">subdivsurface.h:103</a></div></div>
<div class="ttc" id="classShipCAD_1_1Intersection_html_a0092acbb149bb6a5c2e1f9a4b300c2da"><div class="ttname"><a href="classShipCAD_1_1Intersection.html#a0092acbb149bb6a5c2e1f9a4b300c2da">ShipCAD::Intersection::getSplines</a></div><div class="ttdeci">SplineVector &amp; getSplines()</div><div class="ttdef"><b>Definition:</b> <a href="intersection_8h_source.html#l00113">intersection.h:113</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_a919bce0b984cbef1c59534d6e9fec46f"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#a919bce0b984cbef1c59534d6e9fec46f">ShipCAD::HydrostaticCalc::addData</a></div><div class="ttdeci">void addData(QStringList &amp;strings, hydrostatics_mode_t mode, QChar separator)</div><div class="ttdoc">get all Hydrostatics data in a list of strings </div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00189">hydrostaticcalc.cpp:189</a></div></div>
<div class="ttc" id="classShipCAD_1_1Plane_html_a1105f3715d9593c0971e0b0959859a84"><div class="ttname"><a href="classShipCAD_1_1Plane.html#a1105f3715d9593c0971e0b0959859a84">ShipCAD::Plane::a</a></div><div class="ttdeci">float a() const </div><div class="ttdef"><b>Definition:</b> <a href="plane_8h_source.html#l00050">plane.h:50</a></div></div>
<div class="ttc" id="structShipCAD_1_1HydrostaticsData_html_a2a662521564e9c0160c15acf9d3121f9"><div class="ttname"><a href="structShipCAD_1_1HydrostaticsData.html#a2a662521564e9c0160c15acf9d3121f9">ShipCAD::HydrostaticsData::waterplane_mom_inertia</a></div><div class="ttdeci">QVector2D waterplane_mom_inertia</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8h_source.html#l00076">hydrostaticcalc.h:76</a></div></div>
<div class="ttc" id="classShipCAD_1_1ProjectSettings_html_a989e357d35af68ac2da9b0e760926308"><div class="ttname"><a href="classShipCAD_1_1ProjectSettings.html#a989e357d35af68ac2da9b0e760926308">ShipCAD::ProjectSettings::getLength</a></div><div class="ttdeci">float getLength()</div><div class="ttdef"><b>Definition:</b> <a href="projsettings_8h_source.html#l00078">projsettings.h:78</a></div></div>
<div class="ttc" id="classShipCAD_1_1HydrostaticCalc_html_aa4077ad7205ef509d3a54edb8e04b8b7"><div class="ttname"><a href="classShipCAD_1_1HydrostaticCalc.html#aa4077ad7205ef509d3a54edb8e04b8b7">ShipCAD::HydrostaticCalc::addFooter</a></div><div class="ttdeci">void addFooter(QStringList &amp;strings, hydrostatics_mode_t mode)</div><div class="ttdef"><b>Definition:</b> <a href="hydrostaticcalc_8cpp_source.html#l00391">hydrostaticcalc.cpp:391</a></div></div>
<div class="ttc" id="classShipCAD_1_1SubdivisionLayer_html_aee60763cd9524debb45f4a04e46676f2"><div class="ttname"><a href="classShipCAD_1_1SubdivisionLayer.html#aee60763cd9524debb45f4a04e46676f2">ShipCAD::SubdivisionLayer::getSurfaceProperties</a></div><div class="ttdeci">LayerProperties getSurfaceProperties() const </div><div class="ttdef"><b>Definition:</b> <a href="subdivlayer_8cpp_source.html#l00117">subdivlayer.cpp:117</a></div></div>
</div><!-- fragment --></div><!-- contents -->
<!-- start footer part -->
<hr class="footer"/><address class="footer"><small>
Generated on Sun Feb 25 2018 15:36:00 for ShipCAD by &#160;<a href="http://www.doxygen.org/index.html">
<img class="footer" src="doxygen.png" alt="doxygen"/>
</a> 1.8.11
</small></address>
</body>
</html>
